RE: Logging correlation id

2023-01-16 Thread DAVID MARTIN NIETO

Where is that?
enabling tracing, (header trace-parent)

Thanks.



De: Jan Høydahl 
Enviado: viernes, 13 de enero de 2023 16:42
Para: users@solr.apache.org 
Asunto: Re: Logging correlation id

Have you considered enabling tracing, (header trace-parent) and get that Id 
added to the logs?

Jan Høydahl

> 13. jan. 2023 kl. 02:42 skrev Shawn Heisey :
>
> On 1/12/23 12:19, Srijan wrote:
>> I am looking to log additional info to my Solr log. Specifically, I am
>> looking to log a "correlation-id" provided by my client as part of the HTTP
>> header field "x-correlation-id" and put that in my log to relate various
>> client sessions and their actions with Solr. Is there a codeless way of
>> doing this? Has anyone done something similar?
>
> If you make it a URL parameter instead of a header, Solr will log it 
> automatically.
>
> Arbitrary URL parameters that do not match anything Solr expects tend to be 
> ignored, so it is a good way to log something that doesn't affect Solr.
>
> If it must be a header, then you're going to need to write some custom code 
> as suggesteed by Markus.
>
> Thanks,
> Shawn


Re: Error from suggester: "Searching for Solr?"

2023-01-16 Thread Shawn Heisey

On 1/15/23 22:56, Mike wrote:

Thank you for your answer, you were right, the suggester is not in the
plugin list.

I have now taken over the configuration from the example techproducts from
the solrconfig.xml
with only three changes (field->content, weightField-> left empty and
suggestAnalyzerFieldTyoe->text_general).

Something is missing or wrong but I can't imagine that the position of the
suggester configuration in the solrconfig.xml is wrong.


Can you share the entire solrconfig.xml?  If it contains any sensitive 
material, feel free to change those strings to something else, but don't 
just remove the information.  Removal may change the XML structure, and 
that structure is what I am wanting to verify.


Thanks,
Shawn


Re: Error from suggester: "Searching for Solr?"

2023-01-16 Thread Mike
Thank you for your help.
I don't see any errors in the logs.

https://paste.debian.net/hidden/89df3382/

mike



Am Mo., 16. Jan. 2023 um 16:31 Uhr schrieb Shawn Heisey :

> On 1/15/23 22:56, Mike wrote:
> > Thank you for your answer, you were right, the suggester is not in the
> > plugin list.
> >
> > I have now taken over the configuration from the example techproducts
> from
> > the solrconfig.xml
> > with only three changes (field->content, weightField-> left empty and
> > suggestAnalyzerFieldTyoe->text_general).
> >
> > Something is missing or wrong but I can't imagine that the position of
> the
> > suggester configuration in the solrconfig.xml is wrong.
>
> Can you share the entire solrconfig.xml?  If it contains any sensitive
> material, feel free to change those strings to something else, but don't
> just remove the information.  Removal may change the XML structure, and
> that structure is what I am wanting to verify.
>
> Thanks,
> Shawn
>


Re: Error from suggester: "Searching for Solr?"

2023-01-16 Thread Shawn Heisey

On 1/16/2023 9:25 AM, Mike wrote:

Thank you for your help.
I don't see any errors in the logs.

https://paste.debian.net/hidden/89df3382/

mike


If I try with your solrconfig.xml, after fixing errors about missing 
fieldTypes in the schema, I see that the /suggest handler is not 
present.  The XML looks right to me and passes validation, so I can't 
figure out why it doesn't work.


When I just added the two sections to my own solrconfig.xml, the handler 
was present.


Thanks,
Shawn



Solrj error: You must type correct path

2023-01-16 Thread Phil Scadden
So starting to update ancient solr app to 9.1 and also the SolrJ indexer. When 
I try to add a document, I am getting Exception in thread "main" 
org.apache.solr.client.solrj.impl.BaseHttpSolrClient$RemoteSolrException: Error 
from server at http://my.host:8983/solr/qmap: Searching for Solr You must type 
the correct path Solr will respond

I can see the qmap core in the solr admin and solr is running.

Code is:

public class DocumentIndexer {

private final  String fileToIndex;

private final ConcurrentUpdateHttp2SolrClient solrClient;

private final Http2SolrClient http2Client;



public DocumentIndexer(String solrUrl, String fileToIndex) {

this.fileToIndex =fileToIndex;

http2Client = new Http2SolrClient.Builder().build();

solrClient = new ConcurrentUpdateHttp2SolrClient.Builder(solrUrl, 
http2Client).build();

}



public void indexDocuments() throws IOException, SolrServerException{

  ContentStreamUpdateRequest req = new 
ContentStreamUpdateRequest("/update/extract");

  req.setAction(AbstractUpdateRequest.ACTION.COMMIT, true, true);

  req.addFile(new File(fileToIndex),"application/xml");

  req.setParam("id", fileToIndex);

  req.process(solrClient);

  solrClient.commit(true, true);

}

}



Ngā mihi, Nā Phil Scadden
Te Raraunga me te Tātaritanga Mokowā Aronuku (Geospatial Data and Analysis)
GNS Science Te Pῡ Ao
764 Cumberland St, Private Bag 1930,
Dunedin, New Zealand Ph +64 3 4799663, 027 3463185

“Whāia te iti kahurangi ki te tūohu koe me he maunga teitei”

Notice: This email and any attachments are confidential and may not be used, 
published or redistributed without the prior written consent of the Institute 
of Geological and Nuclear Sciences Limited (GNS Science). If received in error 
please destroy and immediately notify GNS Science. Do not copy or disclose the 
contents.


Re: Solrj error: You must type correct path

2023-01-16 Thread Shawn Heisey

On 1/16/23 15:27, Phil Scadden wrote:

So starting to update ancient solr app to 9.1 and also the SolrJ indexer. When I try to 
add a document, I am getting Exception in thread "main" 
org.apache.solr.client.solrj.impl.BaseHttpSolrClient$RemoteSolrException: Error from 
server at http://my.host:8983/solr/qmap: Searching for Solr You must type the correct 
path Solr will respond

I can see the qmap core in the solr admin and solr is running.


Does the qmap core have the /update/extract handler defined?

When I try your code against a core using sample_techproducts_config 
(which DOES have the /update/extract handler defined) I get a different 
error:


Caused by: 
org.apache.solr.client.solrj.impl.BaseHttpSolrClient$RemoteSolrException: 
Error from server at http://localhost:8983/solr: Document is missing 
mandatory uniqueKey field: id


If I change the setParam from "id" to "literal.id" then it works.

Thanks,
Shawn


RE: Solrj error: You must type correct path

2023-01-16 Thread Phil Scadden
Wow - thanks very much for that. I had tried against techproducts but then 
scratched my head about failed id. I will look closely at these now.

Again, really appreciate your prompt and helpful response.

-Original Message-
From: Shawn Heisey 
Sent: Tuesday, 17 January 2023 1:43 PM
To: users@solr.apache.org
Subject: Re: Solrj error: You must type correct path



CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you recognize the sender and know the content 
is safe:

On 1/16/23 15:27, Phil Scadden wrote:
> So starting to update ancient solr app to 9.1 and also the SolrJ
> indexer. When I try to add a document, I am getting Exception in
> thread "main"
> org.apache.solr.client.solrj.impl.BaseHttpSolrClient$RemoteSolrExcepti
> on: Error from server at http://my.host:8983/solr/qmap: Searching for
> Solr You must type the correct path Solr will respond
>
> I can see the qmap core in the solr admin and solr is running.

Does the qmap core have the /update/extract handler defined?

When I try your code against a core using sample_techproducts_config (which 
DOES have the /update/extract handler defined) I get a different
error:

Caused by:
org.apache.solr.client.solrj.impl.BaseHttpSolrClient$RemoteSolrException:
Error from server at http://localhost:8983/solr: Document is missing mandatory 
uniqueKey field: id

If I change the setParam from "id" to "literal.id" then it works.

Thanks,
Shawn
Notice: This email and any attachments are confidential and may not be used, 
published or redistributed without the prior written consent of the Institute 
of Geological and Nuclear Sciences Limited (GNS Science). If received in error 
please destroy and immediately notify GNS Science. Do not copy or disclose the 
contents.