Alan, if you want to search the filename .. it has to be part of the file-content itself. solr doesn't care about the filename itself, only the content of the given file will be indexed.
HTH Stefan On Tue, Feb 15, 2011 at 1:15 AM, 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. >