Solr request for a unique integer field

I have a field defined in schema.xml as:

<field name="id" type="integer" indexed="true" stored="true" required="true" />

This is also uniqueKeyfor the circuit.

I cannot fulfill the request in this field with the url request:

/select?q=4525&qf=id&fl=id,name%2Cscore

This does not return any results, however, if I search in another field (for example, a text field), with a different query, I get many results that include the stored identifier. Solr works fine for text fields, but I cannot request elements based on a unique identifier.

What am I missing? Are there other steps you need to follow to index?

+3
source share
1 answer

, qf ... , . id:4525, :

/select?q=id:4525&fl=id,name,score
+8

Source: https://habr.com/ru/post/1711755/


All Articles