You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Tommy Chheng <to...@gmail.com> on 2010/03/24 06:35:30 UTC

phrase segmentation plugin in component, analyzer, filter or parser?

  I'm writing an experimental phrase segmentation plugin for solr.

My current plan is to write as a SearchComponent by overriding the 
queryString with the new grouped query.
ex. (university of california irvine 2009) will be re-written to 
"university of calfornia irvine" "2009"


Is the SearchComponent the right class to extend for this type of logic?
I picked the component because it was one place where i could get access 
to overwrite the whole query string.

Or is it better design to write it as an analyzer, tokenizer, filter or 
parser plugin?


-- 
Tommy Chheng
Programmer and UC Irvine Graduate Student
Twitter @tommychheng
http://tommy.chheng.com


Re: phrase segmentation plugin in component, analyzer, filter or parser?

Posted by Erik Hatcher <er...@gmail.com>.
On Mar 24, 2010, at 1:35 AM, Tommy Chheng wrote:
> I'm writing an experimental phrase segmentation plugin for solr.
>
> My current plan is to write as a SearchComponent by overriding the  
> queryString with the new grouped query.
> ex. (university of california irvine 2009) will be re-written to  
> "university of calfornia irvine" "2009"
>
>
> Is the SearchComponent the right class to extend for this type of  
> logic?
> I picked the component because it was one place where i could get  
> access to overwrite the whole query string.
>
> Or is it better design to write it as an analyzer, tokenizer, filter  
> or parser plugin?

Seems like a QParserPlugin (and corresponding QParser) are what fit  
best here.  And you may need to have some corresponding analysis  
tricks to ensure things get indexed as your query parser expects for  
search.

	Erik