solrsolrjsolrcloudsolr4

Solr Schemaless mode Query to match any word in a [ Text_general] field type


I'm trying to Search solr query in schemaless mode. but a matching document was not found in the result.

q: i m from india numResult: 0

q: parapfa551d3aef764ddca9e6e421fe8d50e8:i m from india numResult: 1

my data(600+) set in solr all fields of document dynamic added using solr schemaless mode. see my solr document.

the first query I tried to run in solr schemaless mode. but numResult get zero.[solr standalone mode query working. but dynamic field not added in solr.] can I best matching the document found in solr schemaless mode.?

  {
        "id":"d9263e11",
        "titleh4cd06d47basdsa6d14ed8838a123":["User _ name"],
        "parapfa551d3aef764ddca9e6e421fe8d50e8":["  My name is XYZ "],
        "parapffe001011d4346ad9ce9edb67b3b85e4":["  i m from USA ...."],
        "_version_":1748577992052834304},
      {
        "id":"d9263e20",
        "titleh4cd06d47b6d14ed883842ae4cedab224":[" User_name "],
        "parap759981766b644e229bda2b0cc5bd0bd9":["  my name is ...."],
        "parapfa551d3aef764ddca9e6e421fe8d50e8":["  i m from INDIA"],
        "_version_":1748577992544616448},
      {
        "id":"d9263e45",
        "titlehdd4a37c0b21e4d9bbd03a56ba0120f01":[" User_name"],
        "parapa2aa4798c7fc44aab5e4f6447c529f83":["my name is  .... "],
        "parap8ee9090e8e054d78b8dc7ff06a7fb702":["  i m from Germany"],
        "_version_":13204902384923489909}

I'm trying to best match the document found in solr schemaless mode.


Solution

  • Your first query

    q: i m from india
    

    does not have a field specified to search on and therefore Solr will use on a default field (usually _text_) when searching. I suspect your index is probably not populating this default field and hence there is no match.

    Your second query

    q: parapfa551d3aef764ddca9e6e421fe8d50e8:i m from india
    

    is searching for the string in the parapfa551d3aef764ddca9e6e421fe8d50e8 field, and in this case the match is found.

    You can use Solr's debugQuery parameter to see how Solr handles each of these searches on your particular configuration.