Jeff,

It should be in schema.xml at the end of the file. Look for the following.

 <!-- field for the QueryParser to use when an explicit fieldname is absent
-->
 <defaultSearchField>all</defaultSearchField>

To copy your fields to the default search field you should have something
like this.

<copyField source="AD" dest="all"/>
<copyField source="AN" dest="all"/>
<copyField source="COL" dest="all"/>
<copyField source="TI" dest="all"/>

Once you do that you should be able to search for ZS00001. As others
suggested you should look at your index using Luke. That might give you a
clue on whats happening. Solr analyzer is another great resource.
http://localhost:8983/solr/admin/analysis.jsp?highlight=on. Make sure you
select verbose check boxes and enter your fieldname(AD or AN), field value
ZS00001 and query value ZS00001. See how it is indexed and queried in the
output.

Hope that helps. Good luck.

Binesh Gummadi

On Sun, Jun 27, 2010 at 5:37 PM, codar <jeff.kem...@gmail.com> wrote:

>
> Binesh,
>
> Great advice.
>
> Yes, it does show results when I search for id:ZS00001, COL:RW, and TI:MAC,
> but strangely it does not show results when I try AD:ZS00001 or AN:ZS00001.
> Also, I'm not sure where to find the default field, so I'm fairly certain I
> didn't change it.  I'm entering the querytext in the  "Make a Query"
> section
> of the Solr Admin page (http://localhost:8983/solr/admin/).
>
> Here's the result of my query(id:ZS0001):
>
> <response>
>
> <lst name="responseHeader">
>  <int name="status">0</int>
>  <int name="QTime">129</int>
>  <lst name="params">
>  <str name="indent">on</str>
>  <str name="rows">10</str>
>
>  <str name="start">0</str>
>  <str name="q">id:ZS00001</str>
>  <str name="version">2.2</str>
>  </lst>
> </lst>
> <result name="response" numFound="1" start="0">
>  <doc>
>  <arr name="AD"><str>ZS00001</str></arr>
>
>  <arr name="AN"><str>ZS00001</str></arr>
>  <arr name="COL"><str>RW</str></arr>
>  <arr name="TI"><str>How to index Solr on the Mac</str></arr>
>  <str name="id">ZS00001</str>
>  </doc>
> </result>
> </response>
>
>
> I'm reposting the data I indexed and the field definitions:
>
> Here's the data:
> <add><doc>
>                <field name="id">ZS00001</field>
>                <field name="AD">ZS00001</field>
>                 <field name="AN">ZS00001</field>
>                 <field name="COL">RW</field>
>                <field name="TI">How to index Solr on the Mac</field>
> </doc></add>
>
> Here's the schema.xml definitions:
>
>                <field name="AD" type="text" indexed="true" stored="true"
>                        multiValued="true" />
>                 <field name="AN" type="text" indexed="true" stored="true"
>                         multiValued="true" />
>                <field name="COL" type="text" indexed="true" stored="true"
>                        multiValued="true" />
>                <field name="TI" type="text" indexed="true" stored="true"
>                        multiValued="true" />
>
> Thanks again for all the help!!
>
> Jeff
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/example-solr-xml-working-fine-but-my-own-xml-files-not-working-tp504245p926340.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Reply via email to