I didn't find "<defaultSearchField>name</defaultSearchField>" in my solrconfig.xml. Do I need to include this tag?
On Sat, Sep 4, 2010 at 3:04 AM, Papiya Misra <pmi...@pinkotc.com> wrote: > What is the query that you are using ? Try something like q=city:Chicago . > > Look at the solrconfig file and you will see > <defaultSearchField>name</defaultSearchField> . This is the reason that > unless you specify the search field in the query, solr will always > search the field name. > > > On 09/03/2010 04:52 PM, ankita shinde wrote: > >> hello, >> I have done all the suggested changes. My table name is 'info' having >> columns id,name,city and skill. I am able to index them all successfully. >> But I am able to search the data only using name and not other column >> names. >> Where did I go wrong? >> >> >> *My data-config.xml file is as below:* >> >> <dataConfig> >> <dataSource type="JdbcDataSource" >> driver="com.mysql.jdbc.Driver" >> url="jdbc:mysql://3307/dbname" >> user="user-name" >> password="password"/> >> <document> >> <entity name="id" >> query="select id,name,city,skill from info"> >> <field name="id" column="id"/> >> <field name="name" column="name"/> >> <field name="city" column="city"/> >> <field name="skill" column="skill"/> >> </entity> >> </document> >> </dataConfig> >> >> >> >> >> *And the entries made in schema.xml are:* >> >> <field name="city" type="string" indexed="true" stored="true"/> >> <field name="skill" type="string" indexed="true" stored="true"/> >> >> >> entries for id and name are already present. >> >> >> *And i also have added requestimporthandler in solrconfig.xml as follow:* >> >> >> <requestHandler name="/dataimport" >> class="org.apache.solr.handler.dataimport.DataImportHandler"> >> <lst name="defaults"> >> <str name="config">data-config.xml</str> >> </lst> >> </requestHandler> >> >> > Pink OTC Markets Inc. provides the leading inter-dealer quotation and > trading system in the over-the-counter (OTC) securities market. We create > innovative technology and data solutions to efficiently connect market > participants, improve price discovery, increase issuer disclosure, and > better inform investors. Our marketplace, comprised of the issuer-listed > OTCQX and broker-quoted Pink Sheets, is the third largest U.S. equity > trading venue for company shares. > > This document contains confidential information of Pink OTC Markets and is > only intended for the recipient. Do not copy, reproduce (electronically or > otherwise), or disclose without the prior written consent of Pink OTC > Markets. If you receive this message in error, please destroy all > copies in your possession (electronically or otherwise) and contact the > sender above. >