lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <>
Subject [jira] Commented: (SOLR-908) Port of Nutch CommonGrams filter to Solr
Date Fri, 18 Sep 2009 21:11:17 GMT


Robert Muir commented on SOLR-908:

It seems if BTS is caching tokens, then being reused, and isn't
reset, then there would be excess tokens instead of deletions?

right, thats what the test case I added for BufferedTokenStream showed. 
this would be more of a corner case, as i think most BufferedTokenStreams would have empty
lists anyway
by the time they are reset(), so its likely not causing your problem (though it should be

your problem, again is probably the internal state kept in CommonGramsQueryFilter
as you can see, CommonGramsQueryFilter has hairy logic involving the buffered token 'prev'
a lot of this logic has to do with what happens at end of stream.

unfortunately there is no reset() for CommonGramsQueryFilter to set 'prev' back to its initial
state, so when something like QueryParser tries to reuse it, it is probably not behaving correctly.

> Port of Nutch  CommonGrams filter to Solr
> -----------------------------------------
>                 Key: SOLR-908
>                 URL:
>             Project: Solr
>          Issue Type: Wish
>          Components: Analysis
>            Reporter: Tom Burton-West
>            Priority: Minor
>         Attachments:, SOLR-908.patch, SOLR-908.patch, SOLR-908.patch,
SOLR-908.patch, SOLR-908.patch, SOLR-908.patch, SOLR-908.patch
> Phrase queries containing common words are extremely slow.  We are reluctant to just
use stop words due to various problems with false hits and some things becoming impossible
to search with stop words turned on. (For example "to be or not to be", "the who", "man in
the moon" vs "man on the moon" etc.)  
> Several postings regarding slow phrase queries have suggested using the approach used
by Nutch.  Perhaps someone with more Java/Solr experience might take this on.
> It should be possible to port the Nutch CommonGrams code to Solr  and create a suitable
Solr FilterFactory so that it could be used in Solr by listing it in the Solr schema.xml.
> "Construct n-grams for frequently occuring terms and phrases while indexing. Optimize
phrase queries to use the n-grams. Single terms are still indexed too, with n-grams overlaid."

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message