Re: Need help on LTR

2019-03-19 Thread Amjad Khan
Did, but same error

{
  "responseHeader":{
"status":400,
"QTime":5},
  "error":{
"metadata":[
  "error-class","org.apache.solr.common.SolrException",
  "root-error-class","java.lang.NullPointerException"],
"msg":"org.apache.solr.ltr.model.ModelException: Model type does not exist 
org.apache.solr.ltr.model.LinearModel",
"code":400}}



> On Mar 19, 2019, at 3:26 PM, Mohomed Rimash  wrote:
> 
> Please update the weights values to greater than 0 and less than 1.
> 
> On Wed, 20 Mar 2019 at 00:13, Amjad Khan  wrote:
> 
>> Feature File
>> ===
>> 
>> [
>>  {
>>"store" : "exampleFeatureStore",
>>"name" : "isCityName",
>>"class" : "org.apache.solr.ltr.feature.FieldValueFeature",
>>"params" : { "field" : "CITY_NAME" }
>>  },
>>  {
>>"store" : "exampleFeatureStore",
>>"name" : "originalScore",
>>"class" : "org.apache.solr.ltr.feature.OriginalScoreFeature",
>>"params" : {}
>>  },
>>  {
>>"store" : "exampleFeatureStore",
>>"name" : "isLat",
>>"class" : "org.apache.solr.ltr.feature.FieldValueFeature",
>>"params" : { "field" : "LATITUDE" }
>>  }
>> ]
>> 
>> Model File
>> ==
>> {
>>  "store": "exampleFeatureStore",
>>  "class": "org.apache.solr.ltr.model.LinearModel",
>>  "name": "exampleModelStore",
>>  "features": [{
>>  "name": "isCityName"
>>},
>>{
>>  "name": "isLat"
>>},
>>{
>>  "name": "original_score"
>>}
>>  ],
>>  "params": {
>>"weights": {
>>  "isCityName": 0.0,
>>  "isLat": 0.0,
>>  "original_score": 1.0
>>}
>>  }
>> }
>> 
>> 
>> 
>>> On Mar 19, 2019, at 2:04 PM, Mohomed Rimash 
>> wrote:
>>> 
>>> Can you share the feature file and the model file,
>>> 1. I had few instances where invalid values for parameters (ie weights
>> set
>>> to more than 1 , with minmaxnormalizer) resulted the above error,
>>> 2, Check all the features added to the model has a weight under params ->
>>> weights in the model
>>> 
>>> 
>>> On Tue, 19 Mar 2019 at 21:21, Roopa Rao  wrote:
>>> 
>>>> Does your feature definitions and the feature names used in the model
>>>> match?
>>>> 
>>>> On Tue, Mar 19, 2019 at 10:17 AM Amjad Khan 
>> wrote:
>>>> 
>>>>> Yes, I did.
>>>>> 
>>>>> I can see the feature that I created by this
>>>>> schema/feature-store/exampleFeatureStore and it return me the features
>> I
>>>>> created. But issue is when I try to put store-model.
>>>>> 
>>>>>> On Mar 19, 2019, at 12:18 AM, Mohomed Rimash 
>>>>> wrote:
>>>>>> 
>>>>>> Hi Amjad, After adding the libraries into the path, Did you restart
>> the
>>>>>> SOLR ?
>>>>>> 
>>>>>> On Tue, 19 Mar 2019 at 08:45, Amjad Khan  wrote:
>>>>>> 
>>>>>>> I followed the Solr LTR Documentation
>>>>>>> 
>>>>>>> https://lucene.apache.org/solr/guide/7_4/learning-to-rank.html <
>>>>>>> https://lucene.apache.org/solr/guide/7_4/learning-to-rank.html>
>>>>>>> 
>>>>>>> 1. Added library into the solr-config
>>>>>>> 
>>>>>>> >>>>>> regex=".*\.jar" />
>>>>>>> >>>>>> regex="solr-ltr-\d.*\.jar" />
>>>>>>> 2. Successfully added feature
>>>>>>> 3. Get schema to see feature is available
>>>>>>> 4. When I try to push model I see the error below, however I added
>> the
>>>>> lib
>>>>>>> into solr-cofig
>>>>>>> 
>>>>>>> Response
>>>>>>> {
>>>>>>> "responseHeader":{
>>>>>>>  "status":400,
>>>>>>>  "QTime":1},
>>>>>>> "error":{
>>>>>>>  "metadata":[
>>>>>>>"error-class","org.apache.solr.common.SolrException",
>>>>>>>"root-error-class","java.lang.NullPointerException"],
>>>>>>>  "msg":"org.apache.solr.ltr.model.ModelException: Model type does
>>>> not
>>>>>>> exist org.apache.solr.ltr.model.LinearModel",
>>>>>>>  "code":400}}
>>>>>>> 
>>>>>>> Thanks
>>>>> 
>>>>> 
>>>> 
>> 
>> 



Re: Need help on LTR

2019-03-19 Thread Amjad Khan
Roopa,

Yes

> On Mar 19, 2019, at 11:51 AM, Roopa Rao  wrote:
> 
> Does your feature definitions and the feature names used in the model match?
> 
> On Tue, Mar 19, 2019 at 10:17 AM Amjad Khan  wrote:
> 
>> Yes, I did.
>> 
>> I can see the feature that I created by this
>> schema/feature-store/exampleFeatureStore and it return me the features I
>> created. But issue is when I try to put store-model.
>> 
>>> On Mar 19, 2019, at 12:18 AM, Mohomed Rimash 
>> wrote:
>>> 
>>> Hi Amjad, After adding the libraries into the path, Did you restart the
>>> SOLR ?
>>> 
>>> On Tue, 19 Mar 2019 at 08:45, Amjad Khan  wrote:
>>> 
>>>> I followed the Solr LTR Documentation
>>>> 
>>>> https://lucene.apache.org/solr/guide/7_4/learning-to-rank.html <
>>>> https://lucene.apache.org/solr/guide/7_4/learning-to-rank.html>
>>>> 
>>>> 1. Added library into the solr-config
>>>> 
>>>> >>> regex=".*\.jar" />
>>>> >>> regex="solr-ltr-\d.*\.jar" />
>>>> 2. Successfully added feature
>>>> 3. Get schema to see feature is available
>>>> 4. When I try to push model I see the error below, however I added the
>> lib
>>>> into solr-cofig
>>>> 
>>>> Response
>>>> {
>>>> "responseHeader":{
>>>>   "status":400,
>>>>   "QTime":1},
>>>> "error":{
>>>>   "metadata":[
>>>> "error-class","org.apache.solr.common.SolrException",
>>>> "root-error-class","java.lang.NullPointerException"],
>>>>   "msg":"org.apache.solr.ltr.model.ModelException: Model type does not
>>>> exist org.apache.solr.ltr.model.LinearModel",
>>>>   "code":400}}
>>>> 
>>>> Thanks
>> 
>> 



Re: Need help on LTR

2019-03-19 Thread Amjad Khan
Feature File
===

[
  {
"store" : "exampleFeatureStore",
"name" : "isCityName",
"class" : "org.apache.solr.ltr.feature.FieldValueFeature",
"params" : { "field" : "CITY_NAME" }
  },
  {
"store" : "exampleFeatureStore",
"name" : "originalScore",
"class" : "org.apache.solr.ltr.feature.OriginalScoreFeature",
"params" : {}
  },
  {
"store" : "exampleFeatureStore",
"name" : "isLat",
"class" : "org.apache.solr.ltr.feature.FieldValueFeature",
"params" : { "field" : "LATITUDE" }
  }
]

Model File
==
{
  "store": "exampleFeatureStore",
  "class": "org.apache.solr.ltr.model.LinearModel",
  "name": "exampleModelStore",
  "features": [{
  "name": "isCityName"
},
{
  "name": "isLat"
},
{
  "name": "original_score"
}
  ],
  "params": {
"weights": {
  "isCityName": 0.0,
  "isLat": 0.0,
  "original_score": 1.0
}
  }
}



> On Mar 19, 2019, at 2:04 PM, Mohomed Rimash  wrote:
> 
> Can you share the feature file and the model file,
> 1. I had few instances where invalid values for parameters (ie weights set
> to more than 1 , with minmaxnormalizer) resulted the above error,
> 2, Check all the features added to the model has a weight under params ->
> weights in the model
> 
> 
> On Tue, 19 Mar 2019 at 21:21, Roopa Rao  wrote:
> 
>> Does your feature definitions and the feature names used in the model
>> match?
>> 
>> On Tue, Mar 19, 2019 at 10:17 AM Amjad Khan  wrote:
>> 
>>> Yes, I did.
>>> 
>>> I can see the feature that I created by this
>>> schema/feature-store/exampleFeatureStore and it return me the features I
>>> created. But issue is when I try to put store-model.
>>> 
>>>> On Mar 19, 2019, at 12:18 AM, Mohomed Rimash 
>>> wrote:
>>>> 
>>>> Hi Amjad, After adding the libraries into the path, Did you restart the
>>>> SOLR ?
>>>> 
>>>> On Tue, 19 Mar 2019 at 08:45, Amjad Khan  wrote:
>>>> 
>>>>> I followed the Solr LTR Documentation
>>>>> 
>>>>> https://lucene.apache.org/solr/guide/7_4/learning-to-rank.html <
>>>>> https://lucene.apache.org/solr/guide/7_4/learning-to-rank.html>
>>>>> 
>>>>> 1. Added library into the solr-config
>>>>> 
>>>>> >>>> regex=".*\.jar" />
>>>>> >>>> regex="solr-ltr-\d.*\.jar" />
>>>>> 2. Successfully added feature
>>>>> 3. Get schema to see feature is available
>>>>> 4. When I try to push model I see the error below, however I added the
>>> lib
>>>>> into solr-cofig
>>>>> 
>>>>> Response
>>>>> {
>>>>> "responseHeader":{
>>>>>   "status":400,
>>>>>   "QTime":1},
>>>>> "error":{
>>>>>   "metadata":[
>>>>> "error-class","org.apache.solr.common.SolrException",
>>>>> "root-error-class","java.lang.NullPointerException"],
>>>>>   "msg":"org.apache.solr.ltr.model.ModelException: Model type does
>> not
>>>>> exist org.apache.solr.ltr.model.LinearModel",
>>>>>   "code":400}}
>>>>> 
>>>>> Thanks
>>> 
>>> 
>> 



Re: Need help on LTR

2019-03-19 Thread Amjad Khan
Yes, I did.

I can see the feature that I created by this 
schema/feature-store/exampleFeatureStore and it return me the features I 
created. But issue is when I try to put store-model.

> On Mar 19, 2019, at 12:18 AM, Mohomed Rimash  wrote:
> 
> Hi Amjad, After adding the libraries into the path, Did you restart the
> SOLR ?
> 
> On Tue, 19 Mar 2019 at 08:45, Amjad Khan  wrote:
> 
>> I followed the Solr LTR Documentation
>> 
>> https://lucene.apache.org/solr/guide/7_4/learning-to-rank.html <
>> https://lucene.apache.org/solr/guide/7_4/learning-to-rank.html>
>> 
>> 1. Added library into the solr-config
>> 
>>  > regex=".*\.jar" />
>> > regex="solr-ltr-\d.*\.jar" />
>> 2. Successfully added feature
>> 3. Get schema to see feature is available
>> 4. When I try to push model I see the error below, however I added the lib
>> into solr-cofig
>> 
>> Response
>> {
>>  "responseHeader":{
>>"status":400,
>>"QTime":1},
>>  "error":{
>>"metadata":[
>>  "error-class","org.apache.solr.common.SolrException",
>>  "root-error-class","java.lang.NullPointerException"],
>>"msg":"org.apache.solr.ltr.model.ModelException: Model type does not
>> exist org.apache.solr.ltr.model.LinearModel",
>>"code":400}}
>> 
>> Thanks



Re: Need help on LTR

2019-03-19 Thread Amjad Khan
Hi,

Yes, I did restarted the solr server with this JVM param.

> On Mar 19, 2019, at 3:35 AM, Jörn Franke  wrote:
> 
> Did you add the option -Dsolr.ltr.enabled=true ?
> 
>> Am 19.03.2019 um 04:15 schrieb Amjad Khan :
>> 
>> I followed the Solr LTR Documentation 
>> 
>> https://lucene.apache.org/solr/guide/7_4/learning-to-rank.html 
>> <https://lucene.apache.org/solr/guide/7_4/learning-to-rank.html>
>> 
>> 1. Added library into the solr-config
>> 
>> > />
>> > />
>> 2. Successfully added feature
>> 3. Get schema to see feature is available
>> 4. When I try to push model I see the error below, however I added the lib 
>> into solr-cofig
>> 
>> Response
>> {
>> "responseHeader":{
>>   "status":400,
>>   "QTime":1},
>> "error":{
>>   "metadata":[
>> "error-class","org.apache.solr.common.SolrException",
>> "root-error-class","java.lang.NullPointerException"],
>>   "msg":"org.apache.solr.ltr.model.ModelException: Model type does not exist 
>> org.apache.solr.ltr.model.LinearModel",
>>   "code":400}}
>> 
>> Thanks



Need help on LTR

2019-03-18 Thread Amjad Khan
I followed the Solr LTR Documentation 

https://lucene.apache.org/solr/guide/7_4/learning-to-rank.html 


1. Added library into the solr-config

  

2. Successfully added feature
3. Get schema to see feature is available
4. When I try to push model I see the error below, however I added the lib into 
solr-cofig

Response
{
  "responseHeader":{
"status":400,
"QTime":1},
  "error":{
"metadata":[
  "error-class","org.apache.solr.common.SolrException",
  "root-error-class","java.lang.NullPointerException"],
"msg":"org.apache.solr.ltr.model.ModelException: Model type does not exist 
org.apache.solr.ltr.model.LinearModel",
"code":400}}

Thanks

Old searcher to new searcher

2019-03-01 Thread Amjad Khan
We are trying to extend AbstractSolrEventListener class and override 
newSearcher method. Was curious to know if we can copy the existing searcher 
cache to new searcher instead of executing the query receiving from 
solrconfig.. Because we are not sure what item was mostly searched.

Will appreciate the help.

Thanks

Re: Score relevancy

2018-10-25 Thread Amjad Khan
We use ranking below 100 and yes it is float.

> On Oct 25, 2018, at 1:08 PM, David Hastings  
> wrote:
> 
> is this RANK value stored as a float/integer?  and whats the range?  one
> idea is you could use edismax and have a really possible long boost query:
> RANK:[1 TO 2]^10 OR RANK:[3 TO 4]^9
> but this isnt actually a great idea and gets sloppy fast.  you could apply
> boost at index time, or a function query at query time, both represented
> here:
> https://wiki.apache.org/solr/SolrRelevancyFAQ#How_can_I_increase_the_score_for_specific_documents
> 
> 
> 
> On Thu, Oct 25, 2018 at 11:58 AM Amjad Khan  wrote:
> 
>> Hi
>> 
>> Is there a way to achieve the following -
>> 
>> We have a RANK field in each document, and essentially, I would like my
>> score to be influenced by this RANK as follows -
>> 
>> score = score*0.1 + RANK
>> 
>> How can I achieve this with function queries?
>> 
>> Thanks!



Score relevancy

2018-10-25 Thread Amjad Khan
Hi

Is there a way to achieve the following - 

We have a RANK field in each document, and essentially, I would like my score 
to be influenced by this RANK as follows -

score = score*0.1 + RANK

How can I achieve this with function queries?

Thanks!

Re: Slow Response for less volume

2018-10-24 Thread Amjad Khan
Thanks Erick,

But do you think that disabling the cache will increase the response time 
instead of solving the problem here.


> On Oct 24, 2018, at 12:52 PM, Erick Erickson  wrote:
> 
> queryResultCache



Re: Slow Response for less volume

2018-10-24 Thread Amjad Khan
Thanks Wunder for this prompt response.

We are testing with 1600 different text to search with Jmeter and that keeps 
running continuously, and keep running continuously means cache has been built 
and there should be better response now. Doesn’t it?

Thanks



> On Oct 24, 2018, at 12:20 PM, Walter Underwood  wrote:
> 
> Are you testing with a small number of queries? If your cache is larger than 
> the number of queries in your benchmark, the first round will load the cache, 
> then everything will be super fast.
> 
> Load testing a system with caches is hard.
> 
> wunder
> Walter Underwood
> wun...@wunderwood.org
> http://observer.wunderwood.org/  (my blog)
> 
>> On Oct 24, 2018, at 9:19 AM, Amjad Khan  wrote:
>> 
>> Hi,
>> 
>> We recently moved to Solr Cloud (Google) with 4 nodes and have very limited 
>> number of data.
>> 
>> We are facing very weird issue here, solr cluster response time for query is 
>> high when we have less number of hit and the moment we run our test to hit 
>> the solr cluster hard we see better response in 10ms.
>> 
>> Any clue will be appreciated.
>> 
>> Thanks
> 



Slow Response for less volume

2018-10-24 Thread Amjad Khan
Hi,

We recently moved to Solr Cloud (Google) with 4 nodes and have very limited 
number of data.

We are facing very weird issue here, solr cluster response time for query is 
high when we have less number of hit and the moment we run our test to hit the 
solr cluster hard we see better response in 10ms.

Any clue will be appreciated.

Thanks