[xwiki-users] Searching help
I'm working on setting up a wiki for a development group, and we're having some issues with the Lucene searching. The two main problems are that attached files are returned in the search results (usually all images are shown before the page), and searching for the page title (even exactly) doesn't usually return that page as the first result. Do you have any suggestions for fixing this? Thanks! Michael
On 02/24/2011 04:54 AM, Michael Fazio wrote:
I'm working on setting up a wiki for a development group, and we're having some issues with the Lucene searching. The two main problems are that attached files are returned in the search results (usually all images are shown before the page), and searching for the page title (even exactly) doesn't usually return that page as the first result. Do you have any suggestions for fixing this?
We're aware of this, and currently working on a fix. You can watch for http://jira.xwiki.org/jira/browse/XPLUCENE-63 to see when it will get fixed. -- Sergiu Dumitriu http://purl.org/net/sergiu/
Wouldn't it be natural for an application developer based on xwiki to tune the way the Lucene query is submitted to the plugin giving, thus, preference to a match in the title? A simple string replace in velocity would be to replace query text $query with "title:($query)^2.0 ft:($query)" It's not fully bullet proof (careless folks might still close the bracket inside $query) but there's no way to make it bullet proof as long as the luceneplugin only allows queries as strings. I think, however, this can be done today on Main.LuceneSearch. paul Le 24 févr. 2011 à 12:42, Sergiu Dumitriu a écrit :
On 02/24/2011 04:54 AM, Michael Fazio wrote:
I'm working on setting up a wiki for a development group, and we're having some issues with the Lucene searching. The two main problems are that attached files are returned in the search results (usually all images are shown before the page), and searching for the page title (even exactly) doesn't usually return that page as the first result. Do you have any suggestions for fixing this?
We're aware of this, and currently working on a fix. You can watch for http://jira.xwiki.org/jira/browse/XPLUCENE-63 to see when it will get fixed.
On 02/24/2011 01:20 PM, Paul Libbrecht wrote:
Wouldn't it be natural for an application developer based on xwiki to tune the way the Lucene query is submitted to the plugin giving, thus, preference to a match in the title?
A simple string replace in velocity would be to replace query text $query with "title:($query)^2.0 ft:($query)"
Sure, but this should be done automatically. And even this is not good enough, since it will still not solve the problem with attachments, since indexed attachments also have the same title, and they will continue to end up above the document containing them.
It's not fully bullet proof (careless folks might still close the bracket inside $query) but there's no way to make it bullet proof as long as the luceneplugin only allows queries as strings.
I think, however, this can be done today on Main.LuceneSearch.
paul
Le 24 févr. 2011 à 12:42, Sergiu Dumitriu a écrit :
On 02/24/2011 04:54 AM, Michael Fazio wrote:
I'm working on setting up a wiki for a development group, and we're having some issues with the Lucene searching. The two main problems are that attached files are returned in the search results (usually all images are shown before the page), and searching for the page title (even exactly) doesn't usually return that page as the first result. Do you have any suggestions for fixing this?
We're aware of this, and currently working on a fix. You can watch for http://jira.xwiki.org/jira/browse/XPLUCENE-63 to see when it will get fixed.
-- Sergiu Dumitriu http://purl.org/net/sergiu/
If I were to use that string replace method as a quick fix, where would I add that code? Thanks for the replies! On Thu, Feb 24, 2011 at 6:36 AM, Sergiu Dumitriu <[email protected]> wrote:
On 02/24/2011 01:20 PM, Paul Libbrecht wrote:
Wouldn't it be natural for an application developer based on xwiki to tune the way the Lucene query is submitted to the plugin giving, thus, preference to a match in the title?
A simple string replace in velocity would be to replace query text $query with "title:($query)^2.0 ft:($query)"
Sure, but this should be done automatically. And even this is not good enough, since it will still not solve the problem with attachments, since indexed attachments also have the same title, and they will continue to end up above the document containing them.
It's not fully bullet proof (careless folks might still close the bracket inside $query) but there's no way to make it bullet proof as long as the luceneplugin only allows queries as strings.
I think, however, this can be done today on Main.LuceneSearch.
paul
Le 24 févr. 2011 à 12:42, Sergiu Dumitriu a écrit :
On 02/24/2011 04:54 AM, Michael Fazio wrote:
I'm working on setting up a wiki for a development group, and we're having some issues with the Lucene searching. The two main problems are that attached files are returned in the search results (usually all images are shown before the page), and searching for the page title (even exactly) doesn't usually return that page as the first result. Do you have any suggestions for fixing this?
We're aware of this, and currently working on a fix. You can watch for http://jira.xwiki.org/jira/browse/XPLUCENE-63 to see when it will get fixed.
-- Sergiu Dumitriu http://purl.org/net/sergiu/ _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
participants (3)
-
Michael Fazio -
Paul Libbrecht -
Sergiu Dumitriu