Can we see a small sample of an xml file you're posting? Because it should
look something like
<add>
   <doc>
     <field name="stbmodel">R16-500</field>
        more fields here.
   </doc>
</add>

Take a look at the Solr admin page after you've indexed data to see what's
actually in your index, I suspect what's in there isn't what you
expect.

Try querying q=*:* just for yucks to see what the documents returned look like.

I suspect your index doesn't contain anything like what you think, but
that's only
a guess...

Best
Erick

On Mon, Feb 14, 2011 at 7:15 PM, alan bonnemaison <kg6...@gmail.com> wrote:
> Hello!
>
> We receive from our suppliers hardware manufacturing data in XML files. On a
> typical day, we got 25,000 files. That is why I chose to implement Solr.
>
> The file names are made of eleven fields separated by tildas like so
>
> CTCA~PRE~PREP~1010123~ONTDTVP5A~41~P~R16-500~000912239878~20110125~212321.XML
>
> Our R&D guys want to be able search each field of the file XML file names
> (OR operation) but they don't care to search the file contents. Ideally,
> they would like to do a query all files where "stbmodel" equal to "R16-500"
> or "result" is "P" or "filedate" is "20110125"...you get the idea.
>
> I defined in schema.xml each data field like so (from left to right -- sorry
> for the long list):
>
>   <field name="location"       type="textgen"          indexed="false"
> stored="true"   multiValued="false"/>
>   <field name="scriptid"       type="textgen"          indexed="false"
> stored="true"   multiValued="false"/>
>   <field name="slotid"         type="textgen"          indexed="false"
> stored="true"   multiValued="false"/>
>   <field name="workcenter"     type="textgen"          indexed="false"
> stored="false"  multiValued="false"/>
>   <field name="workcenterid"   type="textgen"          indexed="false"
> stored="fase"   multiValued="false"/>
>   <field name="result"         type="string"           indexed="true"
> stored="true"    multiValued="false"/>
>   <field name="computerid"     type="textgen"          indexed="false"
> stored="true"   multiValued="false"/>
>   <field name="stbmodel"       type="textgen"          indexed="true"
> stored="true"    multiValued="false"/>
>   <field name="receiver"       type="string"           indexed="true"
> stored="true"    multiValued="false"/>
>   <field name="filedate"       type="textgen"          indexed="false"
> stored="true"   multiValued="false"/>
>   <field name="filetime"       type="textgen"          indexed="false"
> stored="true"   multiValued="false"/>
>
> Also, I defined as unique key the field "receiver". But no results are
> returned by my queries. I made sure to update my index like so: "java -jar
> apache-solr-1.4.1/example/exampledocs/post.jar *XML".
>
> I am obviously missing something. Is there a way to configure schema.xml to
> search for file names? I welcome your input.
>
> Al.
>

Reply via email to