ConcurrentUpdateSolrClient example?

2017-08-13 Thread Paul Smith Parker
Hello,

I can’t find an example on how to properly instantiate/configure an instance of 
ConcurrentUpdateSolrClient.

I tried this but it gives me a NPE: 

ConcurrentUpdateSolrClient solrClient = new 
ConcurrentUpdateSolrClient.Builder(“http://localhost:8389/solr 
/core").build();

While this seems to work (it should use an internal httpClient):
ConcurrentUpdateSolrClient solrClient = new 
ConcurrentUpdateSolrClient.Builder(“http://localhost:8389/solr 
/core")
.withHttpClient(null)
.withQueueSize(1000)
.withThreadCount(20)
.build();

Is this the correct way to set it up?

Thanks,
P.

RE: Arabic words search in solr

2017-08-13 Thread mohanmca01
Hi Aman Deep,

Thanks for the information, In order to add mm=100% in the request handler,
in which place ?..Can you please share me sample snap. thanks in advance.






--
View this message in context: 
http://lucene.472066.n3.nabble.com/Arabic-words-search-in-solr-tp4317733p4350389.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Arabic words search in solr

2017-08-13 Thread mohanmca01
Any one help me on below use case.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Arabic-words-search-in-solr-tp4317733p4350390.html
Sent from the Solr - User mailing list archive at Nabble.com.


RE: Arabic words search in solr

2017-08-13 Thread Aman Deep Singh
You can configure mm either in the request handler sorconfig.xml or pass as
a request parameter along side the user query
For more detail refer
 https://cwiki.apache.org/confluence/display/solr/The+DisMax+Query+Parser

example of sample handler is


  
10
searchFields
100%
dismax
  

On 13-Aug-2017 6:43 PM, "mohanmca01"  wrote:

Hi Aman Deep,

Thanks for the information, In order to add mm=100% in the request handler,
in which place ?..Can you please share me sample snap. thanks in advance.






--
View this message in context:
http://lucene.472066.n3.nabble.com/Arabic-words-search-in-solr-tp4317733p4350389.html
Sent from the Solr - User mailing list archive at Nabble.com.


RE: Arabic words search in solr

2017-08-13 Thread mohanmca01
Hi Aman Deep Singh,

Thanks for your update... I will update the status after complete the
testing.

I need one more help from your end,can you check below scenario:

we are getting the results while using AND operator in between the words. 

Below is the example: 

Scenario 1:

{ 
  "responseHeader": { 
"status": 0, 
"QTime": 1, 
"params": { 
  "indent": "true", 
  "q": "bizNameAr:(مسقط AND الاتصال)", 
  "_": "1501998206658", 
  "wt": "json" 
} 
  }, 
  "response": { 
"numFound": 44, 
"start": 0, 
"docs": [ 
  { 
"id": "56367", 
"bizNameAr": "بنك مسقط - مركز الاتصال", 
"_version_": 1574621133647380500 
  }, 
  { 
"id": "27224", 
"bizNameAr": "بلدية مسقط -  - بلدية مسقط - مركز الاتصالات", 
"_version_": 1574621132817956900 
  }, 
  { 
"id": "148922", 
"bizNameAr": "بنك مسقط - ميثاق - مركز الاتصال", 
"_version_": 1574621136335929300 
  }, 
  { 
"id": "23695", 
"bizNameAr": "قوة السلطان الخاصة - مركز الإتصالات  - مسقط", 
"_version_": 1574621132683739100 
  }, 
  { 
"id": "34992", 
"bizNameAr": "طوارئ الكهرباء - محافظة مسقط - مركز الاتصال", 
"_version_": 1574621133116801000 
  }, 
  { 
"id": "96500", 
"bizNameAr": "شركة مسقط لتوزيع الكهرباء( ام اي دي سي)  - مركز
الاتصال", 
"_version_": 1574621134575370200 
  }, 
  { 
"id": "23966", 
"bizNameAr": "ديوان البلاط السلطاني - القصر - مسقط - المديرية العامة
للاتصالات ونظم المعلومات -  - المديرية العامة للاتصالات ونظم المعلومات -
البدالة", 
"_version_": 1574621132692127700 
  }, 
  { 
"id": "24005", 
"bizNameAr": "ديوان البلاط السلطاني - القصر - مسقط - المديرية العامة
للاتصالات ونظم المعلومات -  - مدير عام الاتصالات ونظم المعلومات -", 
"_version_": 1574621132694225000 
  }, 
  { 
"id": "24026", 
"bizNameAr": "ديوان البلاط السلطاني - القصر - مسقط - المديرية العامة
للاتصالات ونظم المعلومات -  - مساعد مدير عام الاتصالات ونظم المعلومات -", 
"_version_": 1574621132694225000 
  }, 
  { 
"id": "24096", 
"bizNameAr": "ديوان البلاط السلطاني - القصر - مسقط - المديرية العامة
للاتصالات ونظم المعلومات -  - مدير دائرة الاتصالات والصيانة -", 
"_version_": 1574621132697370600 
  } 
] 
  } 
} 


Scenario 2:. 

{ 
  "responseHeader": { 
"status": 0, 
"QTime": 1, 
"params": { 
  "indent": "true", 
  "q": "bizNameAr:(مسقط AND الات)", 
  "_": "1501998438821", 
  "wt": "json" 
} 
  }, 
  "response": { 
"numFound": 0, 
"start": 0, 
"docs": [] 
  } 
} 

We are expecting same results in the scenario 2 as well where am not typing
the second word fully as in scenario’s 2 input. 


Below are the inputs used in both scenarios: 

Scenario 1:
First word: مسقط 
Second word: الاتصال 

Scenario 2:
First word: مسقط 
Second word: الات 

However, in our current production environment both of the above scenarios
are working fine, but we have an issue of “Hamza” character where we are not
getting results unless typing “Hamza” if it’s there. 

{ 
  "responseHeader": { 
"status": 0, 
"QTime": 9, 
"params": { 
  "fl": "businessNmBl", 
  "indent": "true", 
  "q": "businessNmBl:شرطة إزكي", 
  "_": "1501997897849", 
  "wt": "json" 
} 
  }, 
  "response": { 
"numFound": 1, 
"start": 0, 
"docs": [ 
  { 
"businessNmBl": "شرطة عمان السلطانية - قيادة شرطة محافظة الداخلية  - 
- مركز شرطة إزكي" 
  } 
] 
  } 
} 

Thanks,



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Arabic-words-search-in-solr-tp4317733p4350392.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Arabic words search in solr

2017-08-13 Thread Aman Deep Singh
Try the edge ngram filter
https://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.EdgeNGramFilterFactory
I think it will help you solve the problem

On Sun, Aug 13, 2017 at 7:08 PM mohanmca01  wrote:

> Hi Aman Deep Singh,
>
> Thanks for your update... I will update the status after complete the
> testing.
>
> I need one more help from your end,can you check below scenario:
>
> we are getting the results while using AND operator in between the words.
>
> Below is the example:
>
> Scenario 1:
>
> {
>   "responseHeader": {
> "status": 0,
> "QTime": 1,
> "params": {
>   "indent": "true",
>   "q": "bizNameAr:(مسقط AND الاتصال)",
>   "_": "1501998206658",
>   "wt": "json"
> }
>   },
>   "response": {
> "numFound": 44,
> "start": 0,
> "docs": [
>   {
> "id": "56367",
> "bizNameAr": "بنك مسقط - مركز الاتصال",
> "_version_": 1574621133647380500
>   },
>   {
> "id": "27224",
> "bizNameAr": "بلدية مسقط -  - بلدية مسقط - مركز الاتصالات",
> "_version_": 1574621132817956900
>   },
>   {
> "id": "148922",
> "bizNameAr": "بنك مسقط - ميثاق - مركز الاتصال",
> "_version_": 1574621136335929300
>   },
>   {
> "id": "23695",
> "bizNameAr": "قوة السلطان الخاصة - مركز الإتصالات  - مسقط",
> "_version_": 1574621132683739100
>   },
>   {
> "id": "34992",
> "bizNameAr": "طوارئ الكهرباء - محافظة مسقط - مركز الاتصال",
> "_version_": 1574621133116801000
>   },
>   {
> "id": "96500",
> "bizNameAr": "شركة مسقط لتوزيع الكهرباء( ام اي دي سي)  - مركز
> الاتصال",
> "_version_": 1574621134575370200
>   },
>   {
> "id": "23966",
> "bizNameAr": "ديوان البلاط السلطاني - القصر - مسقط - المديرية
> العامة
> للاتصالات ونظم المعلومات -  - المديرية العامة للاتصالات ونظم المعلومات -
> البدالة",
> "_version_": 1574621132692127700
>   },
>   {
> "id": "24005",
> "bizNameAr": "ديوان البلاط السلطاني - القصر - مسقط - المديرية
> العامة
> للاتصالات ونظم المعلومات -  - مدير عام الاتصالات ونظم المعلومات -",
> "_version_": 1574621132694225000
>   },
>   {
> "id": "24026",
> "bizNameAr": "ديوان البلاط السلطاني - القصر - مسقط - المديرية
> العامة
> للاتصالات ونظم المعلومات -  - مساعد مدير عام الاتصالات ونظم المعلومات -",
> "_version_": 1574621132694225000
>   },
>   {
> "id": "24096",
> "bizNameAr": "ديوان البلاط السلطاني - القصر - مسقط - المديرية
> العامة
> للاتصالات ونظم المعلومات -  - مدير دائرة الاتصالات والصيانة -",
> "_version_": 1574621132697370600
>   }
> ]
>   }
> }
>
>
> Scenario 2:.
>
> {
>   "responseHeader": {
> "status": 0,
> "QTime": 1,
> "params": {
>   "indent": "true",
>   "q": "bizNameAr:(مسقط AND الات)",
>   "_": "1501998438821",
>   "wt": "json"
> }
>   },
>   "response": {
> "numFound": 0,
> "start": 0,
> "docs": []
>   }
> }
>
> We are expecting same results in the scenario 2 as well where am not typing
> the second word fully as in scenario’s 2 input.
>
>
> Below are the inputs used in both scenarios:
>
> Scenario 1:
> First word: مسقط
> Second word: الاتصال
>
> Scenario 2:
> First word: مسقط
> Second word: الات
>
> However, in our current production environment both of the above scenarios
> are working fine, but we have an issue of “Hamza” character where we are
> not
> getting results unless typing “Hamza” if it’s there.
>
> {
>   "responseHeader": {
> "status": 0,
> "QTime": 9,
> "params": {
>   "fl": "businessNmBl",
>   "indent": "true",
>   "q": "businessNmBl:شرطة إزكي",
>   "_": "1501997897849",
>   "wt": "json"
> }
>   },
>   "response": {
> "numFound": 1,
> "start": 0,
> "docs": [
>   {
> "businessNmBl": "شرطة عمان السلطانية - قيادة شرطة محافظة الداخلية
> -
> - مركز شرطة إزكي"
>   }
> ]
>   }
> }
>
> Thanks,
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Arabic-words-search-in-solr-tp4317733p4350392.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>


Re: Different order of docs between SOLR-4.10.4 to SOLR-6.5.1

2017-08-13 Thread SOLR4189
> If you are changing things like WordDelimiterFilterFactory to the graph 
> version, you'll definitely want to reindex

What does it mean "*want to reindex*"? If I change
WordDelimiterFilterFactory to the graph and use IndexUpgrader is it mistake?
Or changes will not be affected only?



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Different-order-of-docs-between-SOLR-4-10-4-to-SOLR-6-5-1-tp4349021p4350413.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Different order of docs between SOLR-4.10.4 to SOLR-6.5.1

2017-08-13 Thread Dave
Rebuild your index. It's just the safest way. 

On Aug 13, 2017, at 2:02 PM, SOLR4189  wrote:

>> If you are changing things like WordDelimiterFilterFactory to the graph 
>> version, you'll definitely want to reindex
> 
> What does it mean "*want to reindex*"? If I change
> WordDelimiterFilterFactory to the graph and use IndexUpgrader is it mistake?
> Or changes will not be affected only?
> 
> 
> 
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Different-order-of-docs-between-SOLR-4-10-4-to-SOLR-6-5-1-tp4349021p4350413.html
> Sent from the Solr - User mailing list archive at Nabble.com.


Re: ConcurrentUpdateSolrClient example?

2017-08-13 Thread Jason Gerlowski
Hi Paul,

I'll try reproducing this with the snippet provided, but I don't see
anything inherently wrong with the Builder usage you mentioned, assuming
the Solr base URL you provided is correct.

It would be easier to troubleshoot your issue though if you included some
more information about the NPE you're seeing. Could you post the stacktrace
to help others investigate please?

Best,

Jason

On Aug 13, 2017 5:43 AM, "Paul Smith Parker" 
wrote:

> Hello,
>
> I can’t find an example on how to properly instantiate/configure an
> instance of ConcurrentUpdateSolrClient.
>
> I tried this but it gives me a NPE:
>
> ConcurrentUpdateSolrClient solrClient = new ConcurrentUpdateSolrClient.
> Builder(“http://localhost:8389/solr /
> core").build();
>
> While this seems to work (it should use an internal httpClient):
> ConcurrentUpdateSolrClient solrClient = new ConcurrentUpdateSolrClient.
> Builder(“http://localhost:8389/solr /core")
> .withHttpClient(null)
> .withQueueSize(1000)
> .withThreadCount(20)
> .build();
>
> Is this the correct way to set it up?
>
> Thanks,
> P.


Re: JSON facet SUM precision and accuracy is incorrect

2017-08-13 Thread Zheng Lin Edwin Yeo
Hi Yonik,

Thanks for your reply.

Will this be solved in the Solr 7.0 version?

For now, is there other method which we can do to overcome this issue?

Regards,
Edwin


On 8 August 2017 at 19:56, Yonik Seeley  wrote:

> This is due to function queries currently lacking type information
> (this problem will occur anywhere function queries are used and is not
> unique to JSON Facet).
> Function queries were originally only used in lucene scoring (which
> only uses float).
> The inner sum(amount1_d,amount2_d) uses SumFloatFunction, hence the
> loss of precision.
>
> One should see the same loss of precision using pseudo-fields with
> function queries for example:
> q=my_document&fl=id, amount1_d, amount2_d ,sum(amount1_d,amount2_d)
>
> The JIRA for this issue: https://issues.apache.org/jira/browse/SOLR-6575
>
> -Yonik
>
>
> On Tue, Aug 8, 2017 at 4:48 AM, Patrick Chan  wrote:
> > Appreciate if anyone can help raise an issue for the JSON facet sum error
> > my staff Edwin raised earlier
> >
> > but have not gotten any response from the Solr community and developers.
> >
> > Our production operation is urgently needing this accuracy to proceed as
> it
> > impacts audit issues.
> >
> >
> > Best regards,
> >
> > Dr.Patrick
> >
> >
> > On Tue, Jul 25, 2017 at 6:27 PM, Zheng Lin Edwin Yeo <
> edwinye...@gmail.com>
> >
> > wrote:
> >
> >> This is the way which I put my JSON facet.
> >>
> >> totalAmount:"sum(sum(amount1_d,amount2_d))"
> >>
> >> amount1_d: 69446961 <6944%206961>.2
> >> amount2_d: 0
> >>
> >> Result I get: 69446959 <6944%206959>.27
> >>
> >>
> >> Regards,
> >> Edwin
> >>
> >>
> >> On 25 July 2017 at 20:44, Zheng Lin Edwin Yeo 
> >> wrote:
> >>
> >> > Hi,
> >> >
> >> > I'm trying to do a sum of two double fields in JSON Facet. One of the
> >> > field has a value of 69446961 <6944%206961>.2, while the other is 0.
> > However, when I
> >> get
> >> > the result, I'm getting a value of 69446959 <6944%206959>.27. This is
> > 1.93 lesser than
> >> > the original value.
> >> >
> >> > What could be the reason?
> >> >
> >> > I'm using Solr 6.5.1.
> >> >
> >> > Regards,
> >> > Edwin
> >> >
>


Re: ConcurrentUpdateSolrClient example?

2017-08-13 Thread Paul Smith Parker
Hello Jason,

I figured it out:

1) ConcurrentUpdateSolrClient build = new 
ConcurrentUpdateSolrClient.Builder("http://localhost:8389/solr/core";).build();
2) ConcurrentUpdateSolrClient build = new 
ConcurrentUpdateSolrClient.Builder("http://localhost:8389/solr/core";)
.withQueueSize(20)
.build();

1) fails with an IllegalArgumentException due to the fact the the queue size is 
not specified.
2) works as expected.

Cheers,
P.

> On 13 Aug 2017, at 22:58, Jason Gerlowski  wrote:
> 
> Hi Paul,
> 
> I'll try reproducing this with the snippet provided, but I don't see
> anything inherently wrong with the Builder usage you mentioned, assuming
> the Solr base URL you provided is correct.
> 
> It would be easier to troubleshoot your issue though if you included some
> more information about the NPE you're seeing. Could you post the stacktrace
> to help others investigate please?
> 
> Best,
> 
> Jason
> 
> On Aug 13, 2017 5:43 AM, "Paul Smith Parker" 
> wrote:
> 
>> Hello,
>> 
>> I can’t find an example on how to properly instantiate/configure an
>> instance of ConcurrentUpdateSolrClient.
>> 
>> I tried this but it gives me a NPE:
>> 
>> ConcurrentUpdateSolrClient solrClient = new ConcurrentUpdateSolrClient.
>> Builder(“http://localhost:8389/solr /
>> core").build();
>> 
>> While this seems to work (it should use an internal httpClient):
>> ConcurrentUpdateSolrClient solrClient = new ConcurrentUpdateSolrClient.
>> Builder(“http://localhost:8389/solr /core")
>>.withHttpClient(null)
>>.withQueueSize(1000)
>>.withThreadCount(20)
>>.build();
>> 
>> Is this the correct way to set it up?
>> 
>> Thanks,
>> P.