Thanks for the quick reply I will have to see if the default query mechanism will suffice for most of my needs
I have skimmed through most of the Solr documentation and didn't see anything describing I can easily change my DB View so that I only source Solr with a single string plus my id field (as my application makng the search will have to collate associated information into a presentable screen anyhow - so I'm not too worried about info being returned by Solr as such) Would that be a reasonable way of using Solr -----Original Message----- From: Joe Calderon [mailto:calderon....@gmail.com] Sent: 02 February 2010 23:42 To: solr-user@lucene.apache.org Subject: Re: Basic indexing question by default solr will only search the default fields, you have to either query all fields field1:(ore) or field2:(ore) or field3:(ore) or use a different query parser like dismax On Tue, Feb 2, 2010 at 3:31 PM, Stefan Maric <sma...@ntlworld.com> wrote: > I have got a basic configuration of Solr up and running and have loaded some data to experiment with > When I run a query for 'ore' I get 3 results when I'm expecting 4 > Dataimport is pulling the expected number of rows in from my DB view > > In my schema.xml I have > <field name="id" type="string" indexed="true" stored="true" required="true" /> > <field name="atomId" type="string" indexed="true" stored="true" required="true" /> > <field name="name" type="text" indexed="true" stored="true"/> > <field name="description" type="text" indexed="true" stored="true" /> > > and the defaults > <field name="text" type="text" indexed="true" stored="false" multiValued="true"/> > <copyField source="name" dest="text"/> > > From an SQL point of view - I am expecting a search for 'ore' to retrieve 4 results (which the following does) > select * from v_sm_search_sectors where description like '% ore%' or name like '% ore%'; > 1000021 B0.010.010 Mining and quarrying Mining of metal ore, stone, sand, clay, coal and other solid minerals > 1000144 E0.030 Metal and metal ores wholesale (null) > 1000145 E0.030.010 Metal and metal ores wholesale (null) > 1000146 E0.030.020 Metal and metal ores wholesale agents (null) > > From a Solr query for 'ore' - I get the following > <response> > - > <lst name="responseHeader"> > <int name="status">0</int> > <int name="QTime">0</int> > - > <lst name="params"> > <str name="rows">10</str> > <str name="start">0</str> > <str name="indent">on</str> > <str name="q">ore</str> > <str name="version">2.2</str> > </lst> > </lst> > - > <result name="response" numFound="3" start="0"> > - > <doc> > <str name="atomId">E0.030</str> > <str name="id">1000144</str> > <str name="name">Metal and metal ores wholesale</str> > </doc> > - > <doc> > <str name="atomId">E0.030.010</str> > <str name="id">1000145</str> > <str name="name">Metal and metal ores wholesale</str> > </doc> > - > <doc> > <str name="atomId">E0.030.020</str> > <str name="id">1000146</str> > <str name="name">Metal and metal ores wholesale agents</str> > </doc> > </result> > </response> > > > So I don't retrieve the document where 'ore' is in the descritpion field (and NOT the name field) > > It would seem that Solr is ONLY returning me results based on what has been put into the <field name="text" by the <copyField source="name" dest="text"/> > > Any hints as to what I've missed ?? > > Regards > Stefan Maric > No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.435 / Virus Database: 271.1.1/2663 - Release Date: 02/02/10 07:35:00