Re: Consultancy for setting up for Apache Solr 8.11.2 on CentOS Linux release 7.9.2009 (Core)

2023-03-07 Thread Jan Høydahl
Yes, please check https://cwiki.apache.org/confluence/display/SOLR/Support 
which may not be 100% up to date, but you should be able to find someone.

Jan

> 6. mar. 2023 kl. 19:03 skrev Kaushal Shriyan :
> 
> Hi,
> 
> Are there any consultancy offered for setting up and optimising Apache Solr
> 8.11.2 on CentOS Linux release 7.9.2009 (Core) for production environment?
> I would love to have a conversation who can guide and recommend us as per
> the best practices.
> 
> Please guide me. Thanks in advance.
> 
> Best Regards,
> 
> Kaushal



Using facet.limit in combination with grouping

2023-03-07 Thread Sebastian Riemer
Hello,

I have a question regarding the paramters "facet.limit" in combination with 
grouping.

My query looks like this:

http://localhost:8982/solr/#/wemi/query?q=*:*
&q.op=OR
&indent=true
&start=0
&facet=true
&facet.missing=true
&facet.sort=count
&facet.mincount=1
&fl=m_classificationList_lang_2_ts_ns_fac
&rows=0
&facet.field=%7B!ex%3Dm_cl_0%7Dm_classificationList_lang_2_ts_ns_fac
&facet.contains=Ka
&facet.contains.ignoreCase=true
&facet.limit=400
&group.field=m_id_cp_s
&group=true
&group.facet=true
&group.ngroups=true
&fq=tenant_id:6
&fq=cat_db_id:2
&fq=%7B!tag%3Dm_cl_0%7D(((m_classificationList_lang_2_ts_ns:(Ka
&fq=m_markedAsDeleted_b:false

I use the parameter facet.limit in order to limit the result for the 
facet.field="m_classificationList_lang_2_ts_ns_fac" to 400 hits. However, 
instead of up to 400 results, I merely get 10 results.

...
"grouped":{
"m_id_cp_s":{
  "matches":6,
  "ngroups":6,
  "groups":[]}},
  "facet_counts":{
"facet_queries":{},
"facet_fields":{
  "m_classificationList_lang_2_ts_ns_fac":[
"Ckk Nordamerika",66,
"Ckm Südamerika",43,
"Xbp2 Zucht und Haltung von Hunden und Katzen",43,
"1D-I DVD / Kabarett",35,
"Ak Kommunikation, Medien, Publizistik, Journalismus",25,
"Ckl Mittelamerika",20,
"Ckl2 Kuba. Jamaika. Haiti. Dominikanische Rep. Puerto",20,
"Chm Südliches Afrika",18,
"Chl Westafrika. Zentralafrika. Ostafrika",17,
"Ep Geschichte Amerikas",17,
null,35234]},
"facet_ranges":{},
"facet_intervals":{},
"facet_heatmaps":{}}}

When I raise the value for the limit to 4000, I suddenly get some more results.

http://localhost:8982/solr/#/wemi/query?q=*:*
&q.op=OR
&indent=true
&start=0
&facet=true
&facet.missing=true
&facet.sort=count
&facet.mincount=1
&fl=m_classificationList_lang_2_ts_ns_fac
&rows=0
&facet.field=%7B!ex%3Dm_cl_0%7Dm_classificationList_lang_2_ts_ns_fac
&facet.contains=Ka
&facet.contains.ignoreCase=true
&facet.limit=4000
&group.field=m_id_cp_s
&group=true
&group.facet=true
&group.ngroups=true
&fq=tenant_id:6
&fq=cat_db_id:2
&fq=%7B!tag%3Dm_cl_0%7D(((m_classificationList_lang_2_ts_ns:(Ka
&fq=m_markedAsDeleted_b:false

...
"grouped":{
"m_id_cp_s":{
  "matches":6,
  "ngroups":6,
  "groups":[]}},
  "facet_counts":{
"facet_queries":{},
"facet_fields":{
  "m_classificationList_lang_2_ts_ns_fac":[
"Ckk Nordamerika",66,
"Ckm Südamerika",43,
"Xbp2 Zucht und Haltung von Hunden und Katzen",43,
"1D-I DVD / Kabarett",35,
"Ak Kommunikation, Medien, Publizistik, Journalismus",25,
"Ckl Mittelamerika",20,
"Ckl2 Kuba. Jamaika. Haiti. Dominikanische Rep. Puerto",20,
"Chm Südliches Afrika",18,
"Chl Westafrika. Zentralafrika. Ostafrika",17,
"Ep Geschichte Amerikas",17,
"Chn Afrikanische Inseln und Inselgruppen",14,
"Chk Nordafrika",13,
"Ybo Kampfsport, Kraftsport, Schwerathletik",13,
"Cen Nordeuropa allgemein (Skandinavien)",10,
"Xeo235 Kalte Küche, Brunch",10,
"Mdp Weissagung (Tarot, Kartenlegen, Nummerologie)",8,
"Eo Geschichte Afrikas",7,
"Ka Religion (Allgemeines)",6,
"Ch Afrika",1,
null,35234]},
"facet_ranges":{},
"facet_intervals":{},
"facet_heatmaps":{}}}

My best guess is, that the parameter facet.limit and grouping together, is 
simply not compatible to each other? When leaving out the grouping-related 
parameters, the limiting works as expected:

http://localhost:8982/solr/#/wemi/query?q=*:*
&q.op=OR
&indent=true
&start=0
&facet=true
&facet.missing=true
&facet.sort=count
&facet.mincount=1
&fl=m_classificationList_lang_2_ts_ns_fac
&rows=0
&facet.field=%7B!ex%3Dm_cl_0%7Dm_classificationList_lang_2_ts_ns_fac
&facet.contains=Ka
&facet.contains.ignoreCase=true
&facet.limit=400
&fq=tenant_id:6
&fq=cat_db_id:2
&fq=%7B!tag%3Dm_cl_0%7D(((m_classificationList_lang_2_ts_ns:(Ka
&fq=m_markedAsDeleted_b:false

...
"facet_counts":{
"facet_queries":{},
"facet_fields":{
  "m_classificationList_lang_2_ts_ns_fac":[
"Ckk Nordamerika",66,
"Ckm Südamerika",44,
"Xbp2 Zucht und Haltung von Hunden und Katzen",43,
"1D-I DVD / Kabarett",35,
"Ak Kommunikation, Medien, Publizistik, Journalismus",25,
"Ckl2 Kuba. Jamaika. Haiti. Dominikanische Rep. Puerto",21,
"Ckl Mittelamerika",20,
"Chm Südliches Afrika",19,
"Chl Westafrika. Zentralafrika. Ostafrika",17,
"Ep Geschichte Amerikas",17,
"Chn Afrikanische Inseln und Inselgruppen",14,
"Chk Nordafrika",13,
"Ybo Kampfsport, Kraftsport, Schwerathletik",13,
"Cen Nordeuropa allgemein (Skandinavien)",10,
"Xeo235 Kalte Küche, Brunch",10,
"Mdp Weissagung (Tarot, Kartenlegen, Nummerologie)",8,
"Eo Geschichte Afrikas",7,
"Ka Religion (Allgemeines)",6,
"Ch Afrika",1,
null,3

Delete silently failing.

2023-03-07 Thread Matthew Castrigno
Hello community,

I am having trouble deleting a document by id.

curl --location --request POST 'x:8983/solr/talix/update?commit=true' \
--header 'Content-Type: application/json' \
--data-raw '{'\''delete'\'': ["1E089335-892C-41F6-B767-632EB5361775"]}'

responds with
{
"responseHeader": {
"status": 0,
"QTime": 308
}
}
But the document is still indexed.  What am I doing wrong? This used to work 
but now does not for some reason.

I have tried with a query also:
{'delete': {'query': 'doc_id:"1E089335-892C-41F6-B767-632EB5361775"'}}

Thank you for your insights and thoughts. They are appreciated.





 [cid:0b804469-5b53-4a65-97d0-20fa6d6f3b28]

Matthew Castrigno

IHT Developer II

St. Luke’s Health System

•  208-859-4276
•  castr...@slhs.org

--
"This message is intended for the use of the person or entity to which it is 
addressed and may contain information that is confidential or privileged, the 
disclosure of which is governed by applicable law. If the reader of this 
message is not the intended recipient, you are hereby notified that any 
dissemination, distribution, or copying of this information is strictly 
prohibited. If you have received this message by error, please notify us 
immediately and destroy the related message."


Re: Delete silently failing.

2023-03-07 Thread Thomas Corthals
Hi Matthew,

There seems to be something strange going on with single quotes and
backslashes around your delete command. Best to use double quotes inside a
single quoted command argument when sending JSON like this.

Maybe you queried too soon, before the change was committed to the index?
You can add an explicit commit to the update command for testing purposes.
(You probably shouldn't do that in production unless you absolutely can't
tolerate any delays for the deletion.)

curl --location --request POST 'x:8983/solr/talix/update?commit=true' \
--header 'Content-Type: application/json' \
--data-raw '{"delete": ["1E089335-892C-41F6-B767-632EB5361775"], "commit":
{}}'

Thomas

Op di 7 mrt 2023 om 20:58 schreef Matthew Castrigno :

> Hello community,
>
> I am having trouble deleting a document by id.
>
> curl --location --request POST 'x:8983/solr/talix/update?commit=true'
>  \
> --header 'Content-Type: application/json' \
> --data-raw '{'\''delete'\'': ["1E089335-892C-41F6-B767-632EB5361775"]}'
>
> responds with
> {
> "responseHeader": {
> "status": 0,
> "QTime": 308
> }
> }
> But the document is still indexed.  What am I doing wrong? This used to
> work but now does not for some reason.
>
> I have tried with a query also:
> {'delete': {'query': 'doc_id:"1E089335-892C-41F6-B767-632EB5361775"'}}
>
> Thank you for your insights and thoughts. They are appreciated.
>
>
>
>
>
>
> *Matthew Castrigno*
>
> *IHT Developer II*
>
> *St. Luke’s Health System*
>
> (  208-859-4276
> +  castr...@slhs.org 
> --
> "This message is intended for the use of the person or entity to which it
> is addressed and may contain information that is confidential or
> privileged, the disclosure of which is governed by applicable law. If the
> reader of this message is not the intended recipient, you are hereby
> notified that any dissemination, distribution, or copying of this
> information is strictly prohibited. If you have received this message by
> error, please notify us immediately and destroy the related message."
>


Re: Delete silently failing.

2023-03-07 Thread Thomas Corthals
Got blindsided by the quotes and didn't notice you already have commit=true
as a URL parameter. That should already cover my suggestion.

Op di 7 mrt 2023 om 22:06 schreef Thomas Corthals :

> Hi Matthew,
>
> There seems to be something strange going on with single quotes and
> backslashes around your delete command. Best to use double quotes inside a
> single quoted command argument when sending JSON like this.
>
> Maybe you queried too soon, before the change was committed to the index?
> You can add an explicit commit to the update command for testing purposes.
> (You probably shouldn't do that in production unless you absolutely can't
> tolerate any delays for the deletion.)
>
> curl --location --request POST 'x:8983/solr/talix/update?commit=true' \
> --header 'Content-Type: application/json' \
> --data-raw '{"delete": ["1E089335-892C-41F6-B767-632EB5361775"], "commit":
> {}}'
>
> Thomas
>
> Op di 7 mrt 2023 om 20:58 schreef Matthew Castrigno :
>
>> Hello community,
>>
>> I am having trouble deleting a document by id.
>>
>> curl --location --request POST 'x:8983/solr/talix/update?commit=true'
>>  \
>> --header 'Content-Type: application/json' \
>> --data-raw '{'\''delete'\'': ["1E089335-892C-41F6-B767-632EB5361775"]}'
>>
>> responds with
>> {
>> "responseHeader": {
>> "status": 0,
>> "QTime": 308
>> }
>> }
>> But the document is still indexed.  What am I doing wrong? This used to
>> work but now does not for some reason.
>>
>> I have tried with a query also:
>> {'delete': {'query': 'doc_id:"1E089335-892C-41F6-B767-632EB5361775"'}}
>>
>> Thank you for your insights and thoughts. They are appreciated.
>>
>>
>>
>>
>>
>>
>> *Matthew Castrigno*
>>
>> *IHT Developer II*
>>
>> *St. Luke’s Health System*
>>
>> (  208-859-4276
>> +  castr...@slhs.org 
>> --
>> "This message is intended for the use of the person or entity to which it
>> is addressed and may contain information that is confidential or
>> privileged, the disclosure of which is governed by applicable law. If the
>> reader of this message is not the intended recipient, you are hereby
>> notified that any dissemination, distribution, or copying of this
>> information is strictly prohibited. If you have received this message by
>> error, please notify us immediately and destroy the related message."
>>
>


Re: Delete silently failing.

2023-03-07 Thread Walter Underwood
Is it supposed to be:

{“delete”: {“id”: "1E089335-892C-41F6-B767-632EB5361775”}}

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

> On Mar 7, 2023, at 1:20 PM, Thomas Corthals  wrote:
> 
> Got blindsided by the quotes and didn't notice you already have commit=true
> as a URL parameter. That should already cover my suggestion.
> 
> Op di 7 mrt 2023 om 22:06 schreef Thomas Corthals :
> 
>> Hi Matthew,
>> 
>> There seems to be something strange going on with single quotes and
>> backslashes around your delete command. Best to use double quotes inside a
>> single quoted command argument when sending JSON like this.
>> 
>> Maybe you queried too soon, before the change was committed to the index?
>> You can add an explicit commit to the update command for testing purposes.
>> (You probably shouldn't do that in production unless you absolutely can't
>> tolerate any delays for the deletion.)
>> 
>> curl --location --request POST 'x:8983/solr/talix/update?commit=true' \
>> --header 'Content-Type: application/json' \
>> --data-raw '{"delete": ["1E089335-892C-41F6-B767-632EB5361775"], "commit":
>> {}}'
>> 
>> Thomas
>> 
>> Op di 7 mrt 2023 om 20:58 schreef Matthew Castrigno :
>> 
>>> Hello community,
>>> 
>>> I am having trouble deleting a document by id.
>>> 
>>> curl --location --request POST 'x:8983/solr/talix/update?commit=true'
>>> \
>>> --header 'Content-Type: application/json' \
>>> --data-raw '{'\''delete'\'': ["1E089335-892C-41F6-B767-632EB5361775"]}'
>>> 
>>> responds with
>>> {
>>>"responseHeader": {
>>>"status": 0,
>>>"QTime": 308
>>>}
>>> }
>>> But the document is still indexed.  What am I doing wrong? This used to
>>> work but now does not for some reason.
>>> 
>>> I have tried with a query also:
>>> {'delete': {'query': 'doc_id:"1E089335-892C-41F6-B767-632EB5361775"'}}
>>> 
>>> Thank you for your insights and thoughts. They are appreciated.
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> *Matthew Castrigno*
>>> 
>>> *IHT Developer II*
>>> 
>>> *St. Luke’s Health System*
>>> 
>>> (  208-859-4276
>>> +  castr...@slhs.org 
>>> --
>>> "This message is intended for the use of the person or entity to which it
>>> is addressed and may contain information that is confidential or
>>> privileged, the disclosure of which is governed by applicable law. If the
>>> reader of this message is not the intended recipient, you are hereby
>>> notified that any dissemination, distribution, or copying of this
>>> information is strictly prohibited. If you have received this message by
>>> error, please notify us immediately and destroy the related message."
>>> 
>> 

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



Re: Delete silently failing.

2023-03-07 Thread Thomas Corthals
These should all be equivalent, but it doesn't hurt to test them all.

{“delete”: {“id”: "1E089335-892C-41F6-B767-632EB5361775”}}

{“delete”: "1E089335-892C-41F6-B767-632EB5361775”}

{“delete”: ["1E089335-892C-41F6-B767-632EB5361775”]}

Op di 7 mrt 2023 om 22:25 schreef Walter Underwood :

> Is it supposed to be:
>
> {“delete”: {“id”: "1E089335-892C-41F6-B767-632EB5361775”}}
>
> wunder
> Walter Underwood
> wun...@wunderwood.org
> https://observer.wunderwood.org/ (my blog)
>
> > On Mar 7, 2023, at 1:20 PM, Thomas Corthals 
> wrote:
> >
> > Got blindsided by the quotes and didn't notice you already have
> commit=true
> > as a URL parameter. That should already cover my suggestion.
> >
> > Op di 7 mrt 2023 om 22:06 schreef Thomas Corthals  >:
> >
> >> Hi Matthew,
> >>
> >> There seems to be something strange going on with single quotes and
> >> backslashes around your delete command. Best to use double quotes
> inside a
> >> single quoted command argument when sending JSON like this.
> >>
> >> Maybe you queried too soon, before the change was committed to the
> index?
> >> You can add an explicit commit to the update command for testing
> purposes.
> >> (You probably shouldn't do that in production unless you absolutely
> can't
> >> tolerate any delays for the deletion.)
> >>
> >> curl --location --request POST
> 'x:8983/solr/talix/update?commit=true' \
> >> --header 'Content-Type: application/json' \
> >> --data-raw '{"delete": ["1E089335-892C-41F6-B767-632EB5361775"],
> "commit":
> >> {}}'
> >>
> >> Thomas
> >>
> >> Op di 7 mrt 2023 om 20:58 schreef Matthew Castrigno  >:
> >>
> >>> Hello community,
> >>>
> >>> I am having trouble deleting a document by id.
> >>>
> >>> curl --location --request POST
> 'x:8983/solr/talix/update?commit=true'
> >>> \
> >>> --header 'Content-Type: application/json' \
> >>> --data-raw '{'\''delete'\'': ["1E089335-892C-41F6-B767-632EB5361775"]}'
> >>>
> >>> responds with
> >>> {
> >>>"responseHeader": {
> >>>"status": 0,
> >>>"QTime": 308
> >>>}
> >>> }
> >>> But the document is still indexed.  What am I doing wrong? This used to
> >>> work but now does not for some reason.
> >>>
> >>> I have tried with a query also:
> >>> {'delete': {'query': 'doc_id:"1E089335-892C-41F6-B767-632EB5361775"'}}
> >>>
> >>> Thank you for your insights and thoughts. They are appreciated.
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> *Matthew Castrigno*
> >>>
> >>> *IHT Developer II*
> >>>
> >>> *St. Luke’s Health System*
> >>>
> >>> (  208-859-4276
> >>> +  castr...@slhs.org 
> >>> --
> >>> "This message is intended for the use of the person or entity to which
> it
> >>> is addressed and may contain information that is confidential or
> >>> privileged, the disclosure of which is governed by applicable law. If
> the
> >>> reader of this message is not the intended recipient, you are hereby
> >>> notified that any dissemination, distribution, or copying of this
> >>> information is strictly prohibited. If you have received this message
> by
> >>> error, please notify us immediately and destroy the related message."
> >>>
> >>
>
> wunder
> Walter Underwood
> wun...@wunderwood.org
> https://observer.wunderwood.org/ (my blog)
>
>


Re: Delete silently failing.

2023-03-07 Thread Shawn Heisey

On 3/7/23 12:58, Matthew Castrigno wrote:

I am having trouble deleting a document by id.

curl --location --request POST 'x:8983/solr/talix/update?commit=true' \
--header 'Content-Type: application/json' \
--data-raw '{'\''delete'\'': ["1E089335-892C-41F6-B767-632EB5361775"]}'


When I send a command like that to Solr 9.2.0-SNAPSHOT it complains, 
with error message:


Cannot parse provided JSON: JSON Parse Error: char=\\,position=1 
AFTER='{\\' BEFORE='\"delete\\\": [\"REDACTED'


If I remove the backslashes before the quotes on delete, then it returns 
a response status 0 and the deleted document is gone.


So you should try removing the backslashes before the double quotes. 
They are not needed because you surrounded the whole string with single 
quotes, which means the shell will not parse them.


The request at the end of your message to delete by query has single 
quotes in the json, and I believe the json standard requires double 
quotes.  And also, it would require backslashes for the quotes around 
the query string, because those quotes need to be sent to Solr as-is. 
json should not parse them.


Thanks,
Shawn


Re: Delete silently failing.

2023-03-07 Thread Matthew Castrigno
Thank you all for your input.

{“delete”: "1E089335-892C-41F6-B767-632EB5361775”}

Works for me.


 [cid:37cdc023-08da-4433-b882-8577129d03c6]

Matthew Castrigno

IHT Developer II

St. Luke’s Health System

•  208-859-4276
•  castr...@slhs.org


From: Shawn Heisey 
Sent: Tuesday, March 7, 2023 3:36 PM
To: users@solr.apache.org 
Subject: Re: Delete silently failing.

On 3/7/23 12: 58, Matthew Castrigno wrote: > I am having trouble deleting a 
document by id. > > curl --location --request POST 'x: 
8983/solr/talix/update?commit=true' \ > --header 'Content-Type:  
application/json' \ > --data-raw
ZjQcmQRYFpfptBannerStart
This Message Is From an External Sender
This message came from outside the St. Luke's email system.

ZjQcmQRYFpfptBannerEnd

On 3/7/23 12:58, Matthew Castrigno wrote:
> I am having trouble deleting a document by id.
>
> curl --location --request POST 'x:8983/solr/talix/update?commit=true' \
> --header 'Content-Type: application/json' \
> --data-raw '{'\''delete'\'': ["1E089335-892C-41F6-B767-632EB5361775"]}'

When I send a command like that to Solr 9.2.0-SNAPSHOT it complains,
with error message:

Cannot parse provided JSON: JSON Parse Error: char=\\,position=1
AFTER='{\\' BEFORE='\"delete\\\": [\"REDACTED'

If I remove the backslashes before the quotes on delete, then it returns
a response status 0 and the deleted document is gone.

So you should try removing the backslashes before the double quotes.
They are not needed because you surrounded the whole string with single
quotes, which means the shell will not parse them.

The request at the end of your message to delete by query has single
quotes in the json, and I believe the json standard requires double
quotes.  And also, it would require backslashes for the quotes around
the query string, because those quotes need to be sent to Solr as-is.
json should not parse them.

Thanks,
Shawn


--
"This message is intended for the use of the person or entity to which it is 
addressed and may contain information that is confidential or privileged, the 
disclosure of which is governed by applicable law. If the reader of this 
message is not the intended recipient, you are hereby notified that any 
dissemination, distribution, or copying of this information is strictly 
prohibited. If you have received this message by error, please notify us 
immediately and destroy the related message."