lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From NewMelchizedec sundararaj <mel...@gmail.com>
Subject Re: Two field phrase search
Date Fri, 23 Nov 2018 14:04:52 GMT
Thanks Mikhail,

I will check this FieldMaskingSpanQuery out.

Thanks
Melchi
On Fri, 23 Nov 2018 at 19:17, Mikhail Khludnev <mkhl@apache.org> wrote:
>
> There's no way to search with positions across other fields. I can only
> recommend to prepend prefix terms to distinguish them.
> But hold on, what about FieldMaskingSpanQuery? It's available in
> XMLQparser, you may try.
>
> On Fri, Nov 23, 2018 at 3:37 AM NewMelchizedec sundararaj <melchi@gmail.com>
> wrote:
>
> > Hi Fellow Searchers,
> >
> > I am indexing some content (say name) in to two fields with different
> > analyzer chains.  One that would do edge prefix and the other regular
> > tokenization.
> > Let me call them name_prefix and name_term
> >
> > When an incoming partial query comes up, like "steve jo", I want the
> > first word to be searched in regular index while the jo to go to
> > prefix index.
> >
> > something like
> > name_term:steve AND name_prefix:jo
> >
> > works.
> >
> > But I would like to use them in a phrase. i.e. expect them to be next
> > to each other.  Following are the things attempted. with out success.
> >
> > 1. regular phrase: "name_term:steve name_prefix:jo"  - does not expect
> > field names.
> > 2. complex phrase query: {!complexphrase inOrder=true}"name_term:steve
> > name_prefix:jo" - does not allow different field names in the same
> > phrase.
> > 3. played around with {!surround}3w(name_term:steve,name_prefix:jo) -
> > does not support subquery (field names).
> >
> > Any other way this can be accomplished?
> >
> > Thanks
> > Melchi
> >
>
>
> --
> Sincerely yours
> Mikhail Khludnev



--

Mime
View raw message