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 vit <bu...@yahoo.com> on 2014/11/21 14:26:39 UTC

matching shingles

I am using Solr 4.2.1 Could someone give me an example how to create a query
wich will be analysed to match shingles



--
View this message in context: http://lucene.472066.n3.nabble.com/matching-shingles-tp4170259.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: matching shingles

Posted by vit <bu...@yahoo.com>.
I set the following filed type
		<fieldType name="text_shingle" class="solr.TextField"
positionIncrementGap="100">
   			<analyzer>
     			<tokenizer class="solr.WhitespaceTokenizerFactory"/>
     			<filter class="solr.ShingleFilterFactory" minShingleSize="2"
maxShingleSize="5"
             			outputUnigrams="true" outputUnigramsIfNoShingles="false"
tokenSeparator=" "/>
   			</analyzer>
 		</fieldType>

with minShingleSize="2"

But it allows to match a single word. What I am doing wrong?



--
View this message in context: http://lucene.472066.n3.nabble.com/matching-shingles-tp4170259p4170364.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: matching shingles

Posted by Erick Erickson <er...@gmail.com>.
That's all just governed by the analysis chain you've
defined for the field in question.

The admin/analysis page will show you the actual
query generated, and is a great place to get an
understanding of how Solr/Lucene to the index
and query time processing on each separate field.

Best,
Erick

On Fri, Nov 21, 2014 at 5:26 AM, vit <bu...@yahoo.com> wrote:
> I am using Solr 4.2.1 Could someone give me an example how to create a query
> wich will be analysed to match shingles
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/matching-shingles-tp4170259.html
> Sent from the Solr - User mailing list archive at Nabble.com.