gmatthew
gmatthew

Reputation: 56

SOLR indexing and searching?

Currently, I'm trying to add a new field to our SOLR engine.

I've added the following into the schema.xml file.

<field name='FIELDNAME'      type='string'  indexed='true' stored='false' />

The xml passed to solr for indexing is:

<FIELDNAMES>
     <FIELDNAME>1</FIELDNAME>
                :
                :
                :
     <FIELDNAME>N</FIELDNAME>
</FIELDNAMES>

For some reason when I do a solr query via the admin or anywhere else with FIELDNAME:1 nothing is returned.

What would be a recommend way to go forward with solving this problem?

Upvotes: 0

Views: 349

Answers (2)

gmatthew
gmatthew

Reputation: 56

I found my problem. The field wasn't added to the Solr Doc file that's ingested into solr.

Upvotes: 0

Pascal Dimassimo
Pascal Dimassimo

Reputation: 6928

The xml format that Solr expects is described in the wiki. Basically, you have a "add" tag containing one or more "doc" tags for each of your document. Each "doc" is made of several "field" tags.

Do a Solr query with q=*:* to see if you manage to index at least one document.

Upvotes: 2

Related Questions