Just installed Solr, edited schema.xml , and now I'm trying to index it and look for some test data on it.
In the XML file that I submit to Solr, one of my fields looks like this:
<field name="PageContent"><![CDATA[<p>some text in a paragrah tag</p>]]></field>
There is HTML there, so I wrapped it in CDATA.
In my Solr schema.xml definition for this field is as follows:
<field name="PageContent" type="text" indexed="true" stored="true"/>
When I started the POSTing tool, everything went fine, but when I search for content that, as I know, is inside the PageContent field, I get no results.
However, when I set the <defaultSearchField> node to PageContent , it works. But if I set it to any other field, it does not search in PageContent .
Am I doing something wrong? what is the problem?
To clarify the error:
I downloaded "doc" with the following data:
<field name="PageID">928</field> <field name="PageName">some name</field> <field name="PageContent"><![CDATA[<p>html content</p>]]></field>
In my schema, I defined the fields as such:
<field name="PageID" type="integer" indexed="true" stored="true" required="true"/> <field name="PageName" type="text" indexed="true" stored="true"/> <field name="PageContent" type="text" indexed="true" stored="true"/>
and
<uniqueKey>PageID</uniqueKey> <defaultSearchField>PageName</defaultSearchField>
Now when I use the Solr administration tool and look for " some name ", I get the result. But, if I search for " html content ", " html ", " content " or " 928 ", I get no results
Why?