JohnJ
JohnJ

Reputation: 7056

solr string field getting no results

I have indexed some data using the string field for name and the entries look like so on my index:

  {
    "custom_id":"234323244323242",
    "full_id":"ju7328732",
    "weblink":"https://planet.org/323232",
    "name":"idexlab",
    "type":"entry",
    "id":"151e0151-1036-4b97-86d1-59f8adaeb8a7",
    "_version_":1770751587544727552},

I created the schema by passing this:

    ( curl -s -X POST -H 'Content-type:application/json' --data-binary '{"add-field": {"name":"name", "type":"string", "multiValued":false, "stored":true, "indexed":true, "termVectors":true }}' "http://localhost:8984/solr/$core_name/schema" | python3 -c "import sys, json; print('***adding name:', json.load(sys.stdin)['responseHeader']['status'])" );

Now, when I search for idexlab on the gui I get nothing :( why? the equivalent query code is:

http://localhost:8984/solr/#/final_idx/query?q=idexlab&q.op=OR&indent=true&useParams=

The same works fine when I set the field to text_general. My understanding was that the string type can be used for exact match cases.

So, why wouldnt this work?

Upvotes: 0

Views: 30

Answers (0)

Related Questions