Re: Payload Fields - Are they still best practise?

2021-07-05 Thread Markus Jelsma
Hello Ash,

We rely heavily on payloads to do the Part-of-Speech scoring for user
queries. When using edismax, you must translate all underlying Query
objects to their Payload supported counterparts, i believe that is in
the rewrite() method. Payloads are an excellent tool to distinguish
homonyms, to make a distinction between verbs, nouns and proper nouns
etc.

I don't have our code at hand, but there is some ancient code
available [1] that did just that. Just be aware that payloads have
changed a lot in the decade. Nothing what you see there will work
today.

Regards,
Markus

[1] 
http://digitalpebble.blogspot.com/2010/08/using-payloads-with-dismaxqparser-in.html

2021-07-05 8:06 GMT+02:00, Ashwin Ramesh :
> Hi everyone,
>
> My team is exploring whether to use payload fields (
> https://lucidworks.com/post/solr-payloads/). Our use case is to have term,
> double-value pair. E.g. dog|2.0, cat|3.1 etc.
>
> We would use this to boost based on a given term. However, I'm not sure
> this field type will work with Edismax parser? Can anyone confirm? Also I'm
> not sure about it's performance.
>
> There isn't a lot of info on the net about this field type. Maybe it's
> silently not best-practise! Please let me know if this is the case.
>
>
> Regards,
> Ash
>
> --
> **
> ** Empowering the world to design
> Share accurate
> information on COVID-19 and spread messages of support to your community.
> Here are some resources
> 
>
> that can help.
>   
>  
>   
> 
>
>
>
>
>
>
>
>
>
>
>


Re: Payload Fields - Are they still best practise?

2021-07-05 Thread Ashwin Ramesh
Thanks Markus!

On Tue, 6 Jul 2021, 5:11 am Markus Jelsma, 
wrote:

> Hello Ash,
>
> We rely heavily on payloads to do the Part-of-Speech scoring for user
> queries. When using edismax, you must translate all underlying Query
> objects to their Payload supported counterparts, i believe that is in
> the rewrite() method. Payloads are an excellent tool to distinguish
> homonyms, to make a distinction between verbs, nouns and proper nouns
> etc.
>
> I don't have our code at hand, but there is some ancient code
> available [1] that did just that. Just be aware that payloads have
> changed a lot in the decade. Nothing what you see there will work
> today.
>
> Regards,
> Markus
>
> [1]
> http://digitalpebble.blogspot.com/2010/08/using-payloads-with-dismaxqparser-in.html
>
> 2021-07-05 8:06 GMT+02:00, Ashwin Ramesh :
> > Hi everyone,
> >
> > My team is exploring whether to use payload fields (
> > https://lucidworks.com/post/solr-payloads/). Our use case is to have
> term,
> > double-value pair. E.g. dog|2.0, cat|3.1 etc.
> >
> > We would use this to boost based on a given term. However, I'm not sure
> > this field type will work with Edismax parser? Can anyone confirm? Also
> I'm
> > not sure about it's performance.
> >
> > There isn't a lot of info on the net about this field type. Maybe it's
> > silently not best-practise! Please let me know if this is the case.
> >
> >
> > Regards,
> > Ash
> >
> > --
> > **
> > ** Empowering the world to design
> > Share accurate
> > information on COVID-19 and spread messages of support to your community.
> > Here are some resources
> > <
> https://about.canva.com/coronavirus-awareness-collection/?utm_medium=pr&utm_source=news&utm_campaign=covid19_templates
> >
> >
> > that can help.
> >   
> >  
> >   
> > 
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>

-- 
**
** Empowering the world to design
Share accurate 
information on COVID-19 and spread messages of support to your community.
Here are some resources 

 
that can help.
   
   
    













Re: HTTPSolrClient - help required [Singleton Recommended?]

2021-07-05 Thread Reej Nayagam
Thanks a lot Shawn.

Regards
Reej

On Mon, 5 Jul 2021 at 1:27 PM, Shawn Heisey  wrote:

> On 7/4/2021 8:55 PM, Reej Nayagam wrote:
> > Please find the versions as below
> > Solr core -  8.8.2
> > Solrj - 8.8.2
> > Zookeeper - 3.6.3
> > Zookeeper jute - 3.6.3
> >
> > Kindly do share any code samples if you have them.
>
> I built some code and pasted it here:
>
> https://apaste.info/fI0a
>
> In my example, this class is called TestSolr, and the method I've built
> is static.  So to use it in another class, you would do something like
> this:
>
> SolrClient client = TestSolr.getSolrClient();
>
> The synchronization on the method ensures that it all works properly in
> multi-threaded code.  If you assign the parts of the ZK ensemble
> somewhere else, you might need to think about proper synchronization for
> that too.
>
> I hope this illustrates what Vincenzo and I were talking about.
>
> Thanks,
> Shawn
>
-- 
*Thanks,*
*Reej*