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 Jason Toy <ja...@gmail.com> on 2011/10/08 21:49:23 UTC
how can I get the exact phrase count from solr?
I know that solr has functions like termfreq and that works fine for single
words.
How can I do the same count but for a phrase? When solr does a full text
search with a phrase, does it actually search for the phrase or does it
break it down into single words? If it is broken down into single words, for
example "hello world" is broken down into "hello" and "world", can I just
do sum(termfreq(column,"hello"),termfreq(column,"world")) to get the same
ranking order that solr produces?
Re: how can I get the exact phrase count from solr?
Posted by Ahmet Arslan <io...@yahoo.com>.
> I know that solr has functions like
> termfreq and that works fine for single
> words.
> How can I do the same count but for a phrase?
You can use ShingleFilterFactory at index time.
http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.ShingleFilterFactory