llg
llg

Reputation: 1

Solr Admin server - basic query request not returning results

I'm new to Solr and the Solrnet technology; I'm stumped with what seems to be something very basic; I haven't found any assistance on searching on the web.

I'm using Solr 8.1 and Solrnet 1.0.19

Using the Solr Admin console I'm able to query using the wildcard (*:*). However using a string that I know is in a document returns num found:0 (I have also been unsuccessful querying from the code).

Here's the code to index and delete my documents:

List<Course> eItems = JsonConvert.DeserializeObject<List<Course>>(File.ReadAllText(@"C:\PathTo\jsonFile\AllItems.json"));
try
  {
     var solr = SolrInstance.LocateSolrServer();
     solr.Delete(SolrQuery.All);
     solr.Commit();
     foreach (Item eItem in eItems)
     {
         solr.Add(eItem);
     }
     //commit to the solr engine
     solr.Commit();

I've added <schemaFactory class="ClassicIndexSchemaFactory"/> to the default solrconfig.xml.

I'm also using the default schema.xml file, I've just added my own fields:

    <field name="idofitem" type="string" indexed="true" stored="true" required="false" multiValued="false" ></field>
    <field name="titleofitem" type="text_general" indexed="true" stored="true" required="false" multiValued="false" ></field>
    <field name="urlofitem" type="text_general" indexed="true" stored="true" required="false" multiValued="false" />
    <field name="subjectofitem" type="text_general" indexed="true" stored="true" required="false" multiValued="false" />

  <uniqueKey>idofitem</uniqueKey>

I've been unable to get past this problem; please if anyone has any suggestions...I'm stumped.

Upvotes: 0

Views: 89

Answers (0)

Related Questions