SOLR not searching on certain fields
- by andy
hey guys, just installed solr, edited the schema.xml, and am now trying to index it and search on it with some test data.
In the XML file I'm sending to SOLR, one of my fields look like this:
<field name="PageContent"><![CDATA[<p>some text in a paragrah tag</p>]]></field>
There's HTML there, so I've wrapped it in CDATA.
In my SOLR schema.xml, the definition for that field looks like this:
<field name="PageContent" type="text" indexed="true" stored="true"/>
When I ran the POSTing tool, everything went ok, but when I search for content which I know is inside the PageContent field, I get no results.
However, when I set the node to PageContent, it works. But if I set it to any other field, it doesn't search in PageContent.
Am I doing something wrong? what's the issue?
thanks very much for any help
cheers!
UPDATE
Just to clarify on the error.
I've uploaded a "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've 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 admin tool and search for "some name" I get a result. But, if I search for "html content", or "html", or "content", or "928", I get no results
why?
cool, thanks!