There's no capability in Solr to do this. Given that different fields
have different analyzer chains, how would position information be
preserved across two fields? It'd be tricky at best.

ComplexPhrase should do what you want by itself, assuming you want
matches for any doc with "steve jobs", "steve johns", "steve johnson"
etc.. Just search for name_term:"steve jo*"

Best,
Erick
On Thu, Nov 22, 2018 at 4:37 PM NewMelchizedec sundararaj
<[email protected]> 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

Reply via email to