On 09/06/2012 05:48 PM, iceicelady wrote:
Hello all, we've recently launched a new wiki and
have been forced to switch
to Database Search because of an odd problem with Lucene. We have multiple
spaces, and when using Lucene, selecting a space from the drop-down list
does NOT return the expected (filtered) results. We still get results from
multiple spaces. Lucene seems to be prioritizing 'weight' over our selection
of a specific space.
We do not have this same problem with Database Search, which filters
correctly every time. Of course, we'd prefer to use Lucene because of the
strong query syntax and weighting.
I have searched forums for days and cannot seem to find someone who has had
the same issue. I feel like it's something simple ... will someone PLEASE
help?
Thank you much!
Well, there are two "bugs" involved here.
One is that when there are spaces (as in white space) in the space name,
the part of the query that is supposed to filter only results from that
space is broken: instead of searching for documents in the space "a
space with whitespace", it searches for documents in the space "a" and
also containing "space with whitespace" as words in the text. I just
fixed this issue for the upcoming 4.3 release:
http://jira.xwiki.org/browse/XWIKI-8191
The second one is that the space name is not stored as it is, but it's
tokenized and analyzed so that it supports non-exact matches. But this
means that if we have two spaces, "Main" and "The Main Space", trying
to
get results from the "Main" space will also include results from the
"The Main Space" space. Fixing this would be a bit harder, since it
means indexing not just the "space" field, but also an "exactspace"
field that would allow exact matches on the space name. I've created
https://jira.xwiki.org/browse/XWIKI-8192 to track this issue.
--
Sergiu Dumitriu
http://purl.org/net/sergiu/