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 Dhanesh Radhakrishnan <dh...@hifx.co.in> on 2015/06/04 07:03:59 UTC

How to identify field names from the suggested values in multiple fields

Hi
Anyone help me to  build a suggester auto complete based on multiple fields?
There are two fields in my schema. Category and Subcategory and I'm trying
to build  suggester based on these 2 fields. When the suggestions result,
how can I distinguish from which filed it come from?

I used a copyfields to combine multiple fields into single field and use
that field in suggester
But this will  return the combined result of category and subcategory. I
can't differentiate the results that fetch from which field

These are the copyfields for autocomplete
<copyField source="category" dest="businessAutoComplete"/>
<copyField source="subcategory" dest="businessAutoComplete"/>

Suggestions should know from which field its from.
For Eg my suggester returns 5 results for the keyword "schools". In that
result  2 from the category field and 3 from the subcategory field.

Schools (Category)
Primary Schools (Subcategory)
Driving Schools (Subcategory)
Day care and play school (Subcategory)
Day Care/Play School (Category)


Is there any way to build like this ??


-- 
 [image: hifx_logo] <http://hifx.in/>
*dhanesh s.R *
Team Lead
t: (+91) 484 4011750 (ext. 712) | m: ​(+91) 99 4 6666 703
e: dhanesh@hifx.in | w: www.hifx.in
<https://www.facebook.com/HiFXIT> <https://twitter.com/HiFXTweets>
<https://www.linkedin.com/company/2889649>
<https://plus.google.com/104259935226993895226/about>

-- 

------------------------------
IMPORTANT: This is an e-mail from HiFX IT Media Services Pvt. Ltd. Its 
content are confidential to the intended recipient. If you are not the 
intended recipient, be advised that you have received this e-mail in error 
and that any use, dissemination, forwarding, printing or copying of this 
e-mail is strictly prohibited. It may not be disclosed to or used by anyone 
other than its intended recipient, nor may it be copied in any way. If 
received in error, please email a reply to the sender, then delete it from 
your system. 

Although this e-mail has been scanned for viruses, HiFX cannot ultimately 
accept any responsibility for viruses and it is your responsibility to scan 
attachments (if any).

​
Before you print this email or attachments, please consider the negative 
environmental impacts associated with printing.

Re: How to identify field names from the suggested values in multiple fields

Posted by Erick Erickson <er...@gmail.com>.
There shouldn't be any limitation. You haven't provided the full stack trace,
so there's not a lot to say.

Do be a little careful, though, since the parameters are slightly different
for analyzingInfix, i.e. indexPath rather than sotreDir.

Best,
Erick

On Thu, Jun 4, 2015 at 4:55 AM, Dhanesh Radhakrishnan
<dh...@hifx.co.in> wrote:
> Dear Erick,
> That document help me to build multiple suggesters
> But still there is one problem that I faced.
> When I used both suggesters with same lookupImpl as
> AnalyzingInfixLookupFactory
> <str name="lookupImpl">AnalyzingInfixLookupFactory</str>
>
> solr throws an error
>
> Caused by: java.lang.RuntimeException         at
> org.apache.solr.spelling.suggest.fst.AnalyzingInfixLookupFactory.create(AnalyzingInfixLookupFactory.java:138)
>         at
> org.apache.solr.spelling.suggest.SolrSuggester.init(SolrSuggester.java:107)
>         at
> org.apache.solr.handler.component.SuggestComponent.inform(SuggestComponent.java:119)
>         at
> org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:620)
>         at org.apache.solr.core.SolrCore.<init>(SolrCore.java:868)
> ... 8 more
>
> So that I changed the Lookup with FuzzyLookupFactory suggester worked for
> both fields.
>
> Is there any limitation using AnalyzingInfixLookupFactory for multiple
> suggesters
>
> I'm using SOLR 5.1
>
> Regards
> dhanesh s.r
>
>
> On Thu, Jun 4, 2015 at 11:33 AM, Erick Erickson <er...@gmail.com>
> wrote:
>
>> Yes, this might help: http://lucidworks.com/blog/solr-suggester/
>>
>> Best,
>> Erick
>>
>> On Wed, Jun 3, 2015 at 10:32 PM, Dhanesh Radhakrishnan
>> <dh...@hifx.co.in> wrote:
>> > Thank you for the quick response.
>> > If I use 2 suggesters, can I get the result in a single request?
>> >
>> http://192.17.80.99:8983/solr/core1/suggest?suggest=true&suggest.dictionary=mySuggester&wt=xml&suggest.q=school
>> > Is there any helping document to build multiple suggesters??
>> >
>> >
>> > On Thu, Jun 4, 2015 at 10:40 AM, Walter Underwood <wunder@wunderwood.org
>> >
>> > wrote:
>> >
>> >> Configure two suggesters, one based on each field. Use both of them and
>> >> you’ll get separate suggestions from each.
>> >>
>> >> wunder
>> >> Walter Underwood
>> >> wunder@wunderwood.org
>> >> http://observer.wunderwood.org/  (my blog)
>> >>
>> >>
>> >> On Jun 3, 2015, at 10:03 PM, Dhanesh Radhakrishnan <dh...@hifx.co.in>
>> >> wrote:
>> >>
>> >> > Hi
>> >> > Anyone help me to  build a suggester auto complete based on multiple
>> >> fields?
>> >> > There are two fields in my schema. Category and Subcategory and I'm
>> >> trying
>> >> > to build  suggester based on these 2 fields. When the suggestions
>> result,
>> >> > how can I distinguish from which filed it come from?
>> >> >
>> >> > I used a copyfields to combine multiple fields into single field and
>> use
>> >> > that field in suggester
>> >> > But this will  return the combined result of category and
>> subcategory. I
>> >> > can't differentiate the results that fetch from which field
>> >> >
>> >> > These are the copyfields for autocomplete
>> >> > <copyField source="category" dest="businessAutoComplete"/>
>> >> > <copyField source="subcategory" dest="businessAutoComplete"/>
>> >> >
>> >> > Suggestions should know from which field its from.
>> >> > For Eg my suggester returns 5 results for the keyword "schools". In
>> that
>> >> > result  2 from the category field and 3 from the subcategory field.
>> >> >
>> >> > Schools (Category)
>> >> > Primary Schools (Subcategory)
>> >> > Driving Schools (Subcategory)
>> >> > Day care and play school (Subcategory)
>> >> > Day Care/Play School (Category)
>> >> >
>> >> >
>> >> > Is there any way to build like this ??
>> >> >
>> >> >
>> >> > --
>> >> > [image: hifx_logo] <http://hifx.in/>
>> >> > *dhanesh s.R *
>> >> > Team Lead
>> >> > t: (+91) 484 4011750 (ext. 712) | m: (+91) 99 4 6666 703
>> >> > e: dhanesh@hifx.in | w: www.hifx.in
>> >> > <https://www.facebook.com/HiFXIT> <https://twitter.com/HiFXTweets>
>> >> > <https://www.linkedin.com/company/2889649>
>> >> > <https://plus.google.com/104259935226993895226/about>
>> >> >
>> >> > --
>> >> >
>> >> > ------------------------------
>> >> > IMPORTANT: This is an e-mail from HiFX IT Media Services Pvt. Ltd. Its
>> >> > content are confidential to the intended recipient. If you are not the
>> >> > intended recipient, be advised that you have received this e-mail in
>> >> error
>> >> > and that any use, dissemination, forwarding, printing or copying of
>> this
>> >> > e-mail is strictly prohibited. It may not be disclosed to or used by
>> >> anyone
>> >> > other than its intended recipient, nor may it be copied in any way. If
>> >> > received in error, please email a reply to the sender, then delete it
>> >> from
>> >> > your system.
>> >> >
>> >> > Although this e-mail has been scanned for viruses, HiFX cannot
>> ultimately
>> >> > accept any responsibility for viruses and it is your responsibility to
>> >> scan
>> >> > attachments (if any).
>> >> >
>> >> >
>> >> > Before you print this email or attachments, please consider the
>> negative
>> >> > environmental impacts associated with printing.
>> >>
>> >>
>> >
>> >
>> > --
>> >  [image: hifx_logo] <http://hifx.in/>
>> > *dhanesh s.R *
>> > Team Lead
>> > t: (+91) 484 4011750 (ext. 712) | m: (+91) 99 4 6666 703
>> > e: dhanesh@hifx.in | w: www.hifx.in
>> > <https://www.facebook.com/HiFXIT> <https://twitter.com/HiFXTweets>
>> > <https://www.linkedin.com/company/2889649>
>> > <https://plus.google.com/104259935226993895226/about>
>> >
>> > --
>> >
>> > ------------------------------
>> > IMPORTANT: This is an e-mail from HiFX IT Media Services Pvt. Ltd. Its
>> > content are confidential to the intended recipient. If you are not the
>> > intended recipient, be advised that you have received this e-mail in
>> error
>> > and that any use, dissemination, forwarding, printing or copying of this
>> > e-mail is strictly prohibited. It may not be disclosed to or used by
>> anyone
>> > other than its intended recipient, nor may it be copied in any way. If
>> > received in error, please email a reply to the sender, then delete it
>> from
>> > your system.
>> >
>> > Although this e-mail has been scanned for viruses, HiFX cannot ultimately
>> > accept any responsibility for viruses and it is your responsibility to
>> scan
>> > attachments (if any).
>> >
>> >
>> > Before you print this email or attachments, please consider the negative
>> > environmental impacts associated with printing.
>>
>
>
>
> --
>  [image: hifx_logo] <http://hifx.in/>
> *dhanesh s.R *
> Team Lead
> t: (+91) 484 4011750 (ext. 712) | m: (+91) 99 4 6666 703
> e: dhanesh@hifx.in | w: www.hifx.in
> <https://www.facebook.com/HiFXIT> <https://twitter.com/HiFXTweets>
> <https://www.linkedin.com/company/2889649>
> <https://plus.google.com/104259935226993895226/about>
>
> --
>
> ------------------------------
> IMPORTANT: This is an e-mail from HiFX IT Media Services Pvt. Ltd. Its
> content are confidential to the intended recipient. If you are not the
> intended recipient, be advised that you have received this e-mail in error
> and that any use, dissemination, forwarding, printing or copying of this
> e-mail is strictly prohibited. It may not be disclosed to or used by anyone
> other than its intended recipient, nor may it be copied in any way. If
> received in error, please email a reply to the sender, then delete it from
> your system.
>
> Although this e-mail has been scanned for viruses, HiFX cannot ultimately
> accept any responsibility for viruses and it is your responsibility to scan
> attachments (if any).
>
>
> Before you print this email or attachments, please consider the negative
> environmental impacts associated with printing.

Re: How to identify field names from the suggested values in multiple fields

Posted by Dhanesh Radhakrishnan <dh...@hifx.co.in>.
Dear Erick,
That document help me to build multiple suggesters
But still there is one problem that I faced.
When I used both suggesters with same lookupImpl as
AnalyzingInfixLookupFactory
<str name="lookupImpl">AnalyzingInfixLookupFactory</str>

solr throws an error

Caused by: java.lang.RuntimeException         at
org.apache.solr.spelling.suggest.fst.AnalyzingInfixLookupFactory.create(AnalyzingInfixLookupFactory.java:138)
        at
org.apache.solr.spelling.suggest.SolrSuggester.init(SolrSuggester.java:107)
        at
org.apache.solr.handler.component.SuggestComponent.inform(SuggestComponent.java:119)
        at
org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:620)
        at org.apache.solr.core.SolrCore.<init>(SolrCore.java:868)
... 8 more

So that I changed the Lookup with FuzzyLookupFactory suggester worked for
both fields.

Is there any limitation using AnalyzingInfixLookupFactory for multiple
suggesters

I'm using SOLR 5.1

Regards
dhanesh s.r


On Thu, Jun 4, 2015 at 11:33 AM, Erick Erickson <er...@gmail.com>
wrote:

> Yes, this might help: http://lucidworks.com/blog/solr-suggester/
>
> Best,
> Erick
>
> On Wed, Jun 3, 2015 at 10:32 PM, Dhanesh Radhakrishnan
> <dh...@hifx.co.in> wrote:
> > Thank you for the quick response.
> > If I use 2 suggesters, can I get the result in a single request?
> >
> http://192.17.80.99:8983/solr/core1/suggest?suggest=true&suggest.dictionary=mySuggester&wt=xml&suggest.q=school
> > Is there any helping document to build multiple suggesters??
> >
> >
> > On Thu, Jun 4, 2015 at 10:40 AM, Walter Underwood <wunder@wunderwood.org
> >
> > wrote:
> >
> >> Configure two suggesters, one based on each field. Use both of them and
> >> you’ll get separate suggestions from each.
> >>
> >> wunder
> >> Walter Underwood
> >> wunder@wunderwood.org
> >> http://observer.wunderwood.org/  (my blog)
> >>
> >>
> >> On Jun 3, 2015, at 10:03 PM, Dhanesh Radhakrishnan <dh...@hifx.co.in>
> >> wrote:
> >>
> >> > Hi
> >> > Anyone help me to  build a suggester auto complete based on multiple
> >> fields?
> >> > There are two fields in my schema. Category and Subcategory and I'm
> >> trying
> >> > to build  suggester based on these 2 fields. When the suggestions
> result,
> >> > how can I distinguish from which filed it come from?
> >> >
> >> > I used a copyfields to combine multiple fields into single field and
> use
> >> > that field in suggester
> >> > But this will  return the combined result of category and
> subcategory. I
> >> > can't differentiate the results that fetch from which field
> >> >
> >> > These are the copyfields for autocomplete
> >> > <copyField source="category" dest="businessAutoComplete"/>
> >> > <copyField source="subcategory" dest="businessAutoComplete"/>
> >> >
> >> > Suggestions should know from which field its from.
> >> > For Eg my suggester returns 5 results for the keyword "schools". In
> that
> >> > result  2 from the category field and 3 from the subcategory field.
> >> >
> >> > Schools (Category)
> >> > Primary Schools (Subcategory)
> >> > Driving Schools (Subcategory)
> >> > Day care and play school (Subcategory)
> >> > Day Care/Play School (Category)
> >> >
> >> >
> >> > Is there any way to build like this ??
> >> >
> >> >
> >> > --
> >> > [image: hifx_logo] <http://hifx.in/>
> >> > *dhanesh s.R *
> >> > Team Lead
> >> > t: (+91) 484 4011750 (ext. 712) | m: (+91) 99 4 6666 703
> >> > e: dhanesh@hifx.in | w: www.hifx.in
> >> > <https://www.facebook.com/HiFXIT> <https://twitter.com/HiFXTweets>
> >> > <https://www.linkedin.com/company/2889649>
> >> > <https://plus.google.com/104259935226993895226/about>
> >> >
> >> > --
> >> >
> >> > ------------------------------
> >> > IMPORTANT: This is an e-mail from HiFX IT Media Services Pvt. Ltd. Its
> >> > content are confidential to the intended recipient. If you are not the
> >> > intended recipient, be advised that you have received this e-mail in
> >> error
> >> > and that any use, dissemination, forwarding, printing or copying of
> this
> >> > e-mail is strictly prohibited. It may not be disclosed to or used by
> >> anyone
> >> > other than its intended recipient, nor may it be copied in any way. If
> >> > received in error, please email a reply to the sender, then delete it
> >> from
> >> > your system.
> >> >
> >> > Although this e-mail has been scanned for viruses, HiFX cannot
> ultimately
> >> > accept any responsibility for viruses and it is your responsibility to
> >> scan
> >> > attachments (if any).
> >> >
> >> >
> >> > Before you print this email or attachments, please consider the
> negative
> >> > environmental impacts associated with printing.
> >>
> >>
> >
> >
> > --
> >  [image: hifx_logo] <http://hifx.in/>
> > *dhanesh s.R *
> > Team Lead
> > t: (+91) 484 4011750 (ext. 712) | m: (+91) 99 4 6666 703
> > e: dhanesh@hifx.in | w: www.hifx.in
> > <https://www.facebook.com/HiFXIT> <https://twitter.com/HiFXTweets>
> > <https://www.linkedin.com/company/2889649>
> > <https://plus.google.com/104259935226993895226/about>
> >
> > --
> >
> > ------------------------------
> > IMPORTANT: This is an e-mail from HiFX IT Media Services Pvt. Ltd. Its
> > content are confidential to the intended recipient. If you are not the
> > intended recipient, be advised that you have received this e-mail in
> error
> > and that any use, dissemination, forwarding, printing or copying of this
> > e-mail is strictly prohibited. It may not be disclosed to or used by
> anyone
> > other than its intended recipient, nor may it be copied in any way. If
> > received in error, please email a reply to the sender, then delete it
> from
> > your system.
> >
> > Although this e-mail has been scanned for viruses, HiFX cannot ultimately
> > accept any responsibility for viruses and it is your responsibility to
> scan
> > attachments (if any).
> >
> >
> > Before you print this email or attachments, please consider the negative
> > environmental impacts associated with printing.
>



-- 
 [image: hifx_logo] <http://hifx.in/>
*dhanesh s.R *
Team Lead
t: (+91) 484 4011750 (ext. 712) | m: ​(+91) 99 4 6666 703
e: dhanesh@hifx.in | w: www.hifx.in
<https://www.facebook.com/HiFXIT> <https://twitter.com/HiFXTweets>
<https://www.linkedin.com/company/2889649>
<https://plus.google.com/104259935226993895226/about>

-- 

------------------------------
IMPORTANT: This is an e-mail from HiFX IT Media Services Pvt. Ltd. Its 
content are confidential to the intended recipient. If you are not the 
intended recipient, be advised that you have received this e-mail in error 
and that any use, dissemination, forwarding, printing or copying of this 
e-mail is strictly prohibited. It may not be disclosed to or used by anyone 
other than its intended recipient, nor may it be copied in any way. If 
received in error, please email a reply to the sender, then delete it from 
your system. 

Although this e-mail has been scanned for viruses, HiFX cannot ultimately 
accept any responsibility for viruses and it is your responsibility to scan 
attachments (if any).

​
Before you print this email or attachments, please consider the negative 
environmental impacts associated with printing.

Re: How to identify field names from the suggested values in multiple fields

Posted by Erick Erickson <er...@gmail.com>.
Yes, this might help: http://lucidworks.com/blog/solr-suggester/

Best,
Erick

On Wed, Jun 3, 2015 at 10:32 PM, Dhanesh Radhakrishnan
<dh...@hifx.co.in> wrote:
> Thank you for the quick response.
> If I use 2 suggesters, can I get the result in a single request?
> http://192.17.80.99:8983/solr/core1/suggest?suggest=true&suggest.dictionary=mySuggester&wt=xml&suggest.q=school
> Is there any helping document to build multiple suggesters??
>
>
> On Thu, Jun 4, 2015 at 10:40 AM, Walter Underwood <wu...@wunderwood.org>
> wrote:
>
>> Configure two suggesters, one based on each field. Use both of them and
>> you’ll get separate suggestions from each.
>>
>> wunder
>> Walter Underwood
>> wunder@wunderwood.org
>> http://observer.wunderwood.org/  (my blog)
>>
>>
>> On Jun 3, 2015, at 10:03 PM, Dhanesh Radhakrishnan <dh...@hifx.co.in>
>> wrote:
>>
>> > Hi
>> > Anyone help me to  build a suggester auto complete based on multiple
>> fields?
>> > There are two fields in my schema. Category and Subcategory and I'm
>> trying
>> > to build  suggester based on these 2 fields. When the suggestions result,
>> > how can I distinguish from which filed it come from?
>> >
>> > I used a copyfields to combine multiple fields into single field and use
>> > that field in suggester
>> > But this will  return the combined result of category and subcategory. I
>> > can't differentiate the results that fetch from which field
>> >
>> > These are the copyfields for autocomplete
>> > <copyField source="category" dest="businessAutoComplete"/>
>> > <copyField source="subcategory" dest="businessAutoComplete"/>
>> >
>> > Suggestions should know from which field its from.
>> > For Eg my suggester returns 5 results for the keyword "schools". In that
>> > result  2 from the category field and 3 from the subcategory field.
>> >
>> > Schools (Category)
>> > Primary Schools (Subcategory)
>> > Driving Schools (Subcategory)
>> > Day care and play school (Subcategory)
>> > Day Care/Play School (Category)
>> >
>> >
>> > Is there any way to build like this ??
>> >
>> >
>> > --
>> > [image: hifx_logo] <http://hifx.in/>
>> > *dhanesh s.R *
>> > Team Lead
>> > t: (+91) 484 4011750 (ext. 712) | m: (+91) 99 4 6666 703
>> > e: dhanesh@hifx.in | w: www.hifx.in
>> > <https://www.facebook.com/HiFXIT> <https://twitter.com/HiFXTweets>
>> > <https://www.linkedin.com/company/2889649>
>> > <https://plus.google.com/104259935226993895226/about>
>> >
>> > --
>> >
>> > ------------------------------
>> > IMPORTANT: This is an e-mail from HiFX IT Media Services Pvt. Ltd. Its
>> > content are confidential to the intended recipient. If you are not the
>> > intended recipient, be advised that you have received this e-mail in
>> error
>> > and that any use, dissemination, forwarding, printing or copying of this
>> > e-mail is strictly prohibited. It may not be disclosed to or used by
>> anyone
>> > other than its intended recipient, nor may it be copied in any way. If
>> > received in error, please email a reply to the sender, then delete it
>> from
>> > your system.
>> >
>> > Although this e-mail has been scanned for viruses, HiFX cannot ultimately
>> > accept any responsibility for viruses and it is your responsibility to
>> scan
>> > attachments (if any).
>> >
>> >
>> > Before you print this email or attachments, please consider the negative
>> > environmental impacts associated with printing.
>>
>>
>
>
> --
>  [image: hifx_logo] <http://hifx.in/>
> *dhanesh s.R *
> Team Lead
> t: (+91) 484 4011750 (ext. 712) | m: (+91) 99 4 6666 703
> e: dhanesh@hifx.in | w: www.hifx.in
> <https://www.facebook.com/HiFXIT> <https://twitter.com/HiFXTweets>
> <https://www.linkedin.com/company/2889649>
> <https://plus.google.com/104259935226993895226/about>
>
> --
>
> ------------------------------
> IMPORTANT: This is an e-mail from HiFX IT Media Services Pvt. Ltd. Its
> content are confidential to the intended recipient. If you are not the
> intended recipient, be advised that you have received this e-mail in error
> and that any use, dissemination, forwarding, printing or copying of this
> e-mail is strictly prohibited. It may not be disclosed to or used by anyone
> other than its intended recipient, nor may it be copied in any way. If
> received in error, please email a reply to the sender, then delete it from
> your system.
>
> Although this e-mail has been scanned for viruses, HiFX cannot ultimately
> accept any responsibility for viruses and it is your responsibility to scan
> attachments (if any).
>
>
> Before you print this email or attachments, please consider the negative
> environmental impacts associated with printing.

Re: How to identify field names from the suggested values in multiple fields

Posted by Dhanesh Radhakrishnan <dh...@hifx.co.in>.
Thank you for the quick response.
If I use 2 suggesters, can I get the result in a single request?
http://192.17.80.99:8983/solr/core1/suggest?suggest=true&suggest.dictionary=mySuggester&wt=xml&suggest.q=school
Is there any helping document to build multiple suggesters??


On Thu, Jun 4, 2015 at 10:40 AM, Walter Underwood <wu...@wunderwood.org>
wrote:

> Configure two suggesters, one based on each field. Use both of them and
> you’ll get separate suggestions from each.
>
> wunder
> Walter Underwood
> wunder@wunderwood.org
> http://observer.wunderwood.org/  (my blog)
>
>
> On Jun 3, 2015, at 10:03 PM, Dhanesh Radhakrishnan <dh...@hifx.co.in>
> wrote:
>
> > Hi
> > Anyone help me to  build a suggester auto complete based on multiple
> fields?
> > There are two fields in my schema. Category and Subcategory and I'm
> trying
> > to build  suggester based on these 2 fields. When the suggestions result,
> > how can I distinguish from which filed it come from?
> >
> > I used a copyfields to combine multiple fields into single field and use
> > that field in suggester
> > But this will  return the combined result of category and subcategory. I
> > can't differentiate the results that fetch from which field
> >
> > These are the copyfields for autocomplete
> > <copyField source="category" dest="businessAutoComplete"/>
> > <copyField source="subcategory" dest="businessAutoComplete"/>
> >
> > Suggestions should know from which field its from.
> > For Eg my suggester returns 5 results for the keyword "schools". In that
> > result  2 from the category field and 3 from the subcategory field.
> >
> > Schools (Category)
> > Primary Schools (Subcategory)
> > Driving Schools (Subcategory)
> > Day care and play school (Subcategory)
> > Day Care/Play School (Category)
> >
> >
> > Is there any way to build like this ??
> >
> >
> > --
> > [image: hifx_logo] <http://hifx.in/>
> > *dhanesh s.R *
> > Team Lead
> > t: (+91) 484 4011750 (ext. 712) | m: ​(+91) 99 4 6666 703
> > e: dhanesh@hifx.in | w: www.hifx.in
> > <https://www.facebook.com/HiFXIT> <https://twitter.com/HiFXTweets>
> > <https://www.linkedin.com/company/2889649>
> > <https://plus.google.com/104259935226993895226/about>
> >
> > --
> >
> > ------------------------------
> > IMPORTANT: This is an e-mail from HiFX IT Media Services Pvt. Ltd. Its
> > content are confidential to the intended recipient. If you are not the
> > intended recipient, be advised that you have received this e-mail in
> error
> > and that any use, dissemination, forwarding, printing or copying of this
> > e-mail is strictly prohibited. It may not be disclosed to or used by
> anyone
> > other than its intended recipient, nor may it be copied in any way. If
> > received in error, please email a reply to the sender, then delete it
> from
> > your system.
> >
> > Although this e-mail has been scanned for viruses, HiFX cannot ultimately
> > accept any responsibility for viruses and it is your responsibility to
> scan
> > attachments (if any).
> >
> > ​
> > Before you print this email or attachments, please consider the negative
> > environmental impacts associated with printing.
>
>


-- 
 [image: hifx_logo] <http://hifx.in/>
*dhanesh s.R *
Team Lead
t: (+91) 484 4011750 (ext. 712) | m: ​(+91) 99 4 6666 703
e: dhanesh@hifx.in | w: www.hifx.in
<https://www.facebook.com/HiFXIT> <https://twitter.com/HiFXTweets>
<https://www.linkedin.com/company/2889649>
<https://plus.google.com/104259935226993895226/about>

-- 

------------------------------
IMPORTANT: This is an e-mail from HiFX IT Media Services Pvt. Ltd. Its 
content are confidential to the intended recipient. If you are not the 
intended recipient, be advised that you have received this e-mail in error 
and that any use, dissemination, forwarding, printing or copying of this 
e-mail is strictly prohibited. It may not be disclosed to or used by anyone 
other than its intended recipient, nor may it be copied in any way. If 
received in error, please email a reply to the sender, then delete it from 
your system. 

Although this e-mail has been scanned for viruses, HiFX cannot ultimately 
accept any responsibility for viruses and it is your responsibility to scan 
attachments (if any).

​
Before you print this email or attachments, please consider the negative 
environmental impacts associated with printing.

Re: How to identify field names from the suggested values in multiple fields

Posted by Walter Underwood <wu...@wunderwood.org>.
Configure two suggesters, one based on each field. Use both of them and you’ll get separate suggestions from each.

wunder
Walter Underwood
wunder@wunderwood.org
http://observer.wunderwood.org/  (my blog)


On Jun 3, 2015, at 10:03 PM, Dhanesh Radhakrishnan <dh...@hifx.co.in> wrote:

> Hi
> Anyone help me to  build a suggester auto complete based on multiple fields?
> There are two fields in my schema. Category and Subcategory and I'm trying
> to build  suggester based on these 2 fields. When the suggestions result,
> how can I distinguish from which filed it come from?
> 
> I used a copyfields to combine multiple fields into single field and use
> that field in suggester
> But this will  return the combined result of category and subcategory. I
> can't differentiate the results that fetch from which field
> 
> These are the copyfields for autocomplete
> <copyField source="category" dest="businessAutoComplete"/>
> <copyField source="subcategory" dest="businessAutoComplete"/>
> 
> Suggestions should know from which field its from.
> For Eg my suggester returns 5 results for the keyword "schools". In that
> result  2 from the category field and 3 from the subcategory field.
> 
> Schools (Category)
> Primary Schools (Subcategory)
> Driving Schools (Subcategory)
> Day care and play school (Subcategory)
> Day Care/Play School (Category)
> 
> 
> Is there any way to build like this ??
> 
> 
> -- 
> [image: hifx_logo] <http://hifx.in/>
> *dhanesh s.R *
> Team Lead
> t: (+91) 484 4011750 (ext. 712) | m: ​(+91) 99 4 6666 703
> e: dhanesh@hifx.in | w: www.hifx.in
> <https://www.facebook.com/HiFXIT> <https://twitter.com/HiFXTweets>
> <https://www.linkedin.com/company/2889649>
> <https://plus.google.com/104259935226993895226/about>
> 
> -- 
> 
> ------------------------------
> IMPORTANT: This is an e-mail from HiFX IT Media Services Pvt. Ltd. Its 
> content are confidential to the intended recipient. If you are not the 
> intended recipient, be advised that you have received this e-mail in error 
> and that any use, dissemination, forwarding, printing or copying of this 
> e-mail is strictly prohibited. It may not be disclosed to or used by anyone 
> other than its intended recipient, nor may it be copied in any way. If 
> received in error, please email a reply to the sender, then delete it from 
> your system. 
> 
> Although this e-mail has been scanned for viruses, HiFX cannot ultimately 
> accept any responsibility for viruses and it is your responsibility to scan 
> attachments (if any).
> 
> ​
> Before you print this email or attachments, please consider the negative 
> environmental impacts associated with printing.