lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "efriwp@gmail.com" <efr...@gmail.com>
Subject Re: Does SOLR Allow q= (A or B) AND (C or D)?
Date Fri, 28 May 2010 01:42:29 GMT
Hi Ahmet,

Thanks again for the feedback. We will be searching several fields of each
object in the index (title, description, tags). The matches on keywords need
to be in any of these fields and there will be no different weights.

Does this affect your solution?

I'm trying to understand it as best I can as I didn't set up our solr nor am
I directly managing its implementation.

thanks

Brad


On Thu, May 27, 2010 at 8:12 PM, Ahmet Arslan <iorixxx@yahoo.com> wrote:

> > > We don't mind the order of terms. We basically are
> > sorting by two variables
> > that are independent of relevency.  So I would assume
> > the order doesn't
> > matter... we just need to make sure any results we filter
> > down to (as you
> > saw in the krop.com example) contain the words the user has
> > typed.
> >
>
> Lets say you have short title field and you are going to give
> suggest/autocomplete using this field from index and order is not important.
> But in this ca
>
> <fieldType name="prefix_full" class="solr.TextField"
> positionIncrementGap="1">
> <analyzer type="index">
> <tokenizer class="solr.KeywordTokenizerFactory"/>
> <filter class="solr.TrimFilterFactory"/>
> <filter class="solr.LowerCaseFilterFactory"/>
> <filter class="solr.EdgeNGramFilterFactory" minGramSize="1"
> maxGramSize="20"/>
> </analyzer>
> <analyzer type="query">
> <tokenizer class="solr.KeywordTokenizerFactory"/>
> <filter class="solr.LowerCaseFilterFactory"/>
> </analyzer>
> </fieldType>
>
> <fieldType name="prefix_token" class="solr.TextField"
> positionIncrementGap="1">
> <analyzer type="index">
> <tokenizer class="solr.WhitespaceTokenizerFactory"/>
> <filter class="solr.LowerCaseFilterFactory"/>
> <filter class="solr.EdgeNGramFilterFactory" minGramSize="1"
> maxGramSize="20"/>
> </analyzer>
>
> You can use these two fields, populate them from your short title field
>
> <copyField source="Title" dest="titlePrefix"/>
> <copyField source="Title" dest="titlePrefixFull"/>
>
> and use normal query, (not wildcard) as the user types words
> q=titlePrefix:(term1 te) titlePrefixFull:"term1
> te"&defType=lucene&q.op=OR&fl=Title
> will return you suggestions. Does this satisfy your needs?
> In this case you are suggesting whole title field.
>
> Or do you want to use ShingleFilterFactory with wildcard query?
>
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message