And this works:
localhost:8080/solr/select?q=title:solr
this gives output as required doc,
but
localhost:8080/solr/select?q=contents:solr
 gives num found as 0

This is the new edited schema.xml :
<schema name="documents">
<fields>
<field name="id" type="string" indexed="true" stored="true" required="true"
multiValued="false"/>
<field name="author" type="string" indexed="true" stored="true"
multiValued="true"/>
<field name="comments" type="text" indexed="true" stored="true"
multiValued="false"/>
<field name="keywords" type="text" indexed="true" stored="true"
multiValued="false"/>
<field name="contents" type="text" indexed="true" stored="true"
multiValued="false"/>
<field name="title" type="text" indexed="true" stored="true"
multiValued="false"/>
<field name="revision_number" type="string" indexed="true" stored="true"
multiValued="false"/>

<field name="_version_" type="long" indexed="true" stored="true"
multiValued="false"/>
<dynamicField name="ignored_*" type="string" indexed="false" stored="true"
multiValued="true"/>
<copyfield source="*" dest="text" />
</fields>
<types>
<fieldType name="string" class="solr.StrField" />
<fieldType name="integer" class="solr.IntField" />
<fieldType name="long" class="solr.LongField" />
<fieldType name="text" class="solr.TextField" >
<analyzer type="index">
<tokenizer class="solr.WhitespaceTokenizerFactory"/…
</analyzer>
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory"/…
</analyzer>
</fieldType>
<fieldtype name="ignored" stored="false" indexed="false" multiValued="true"
class="solr.StrField" />
</types>
<uniqueKey>id</uniqueKey>
</schema>


On Sat, Sep 21, 2013 at 7:58 PM, Nutan <nutanshinde1...@gmail.com> wrote:

> I have been trying to resolve the problem of searching within doc,it wasnt
> working so I thought of installing solr on other system.I followed the same
> process->to install tomcat->create solr-home folder->solr.xml->then I get
> the homepage(admin)of solr and followed Solr cookbook for extracting
> handler
> but I get this error:
> update/extract/ not found on this server.
> Now I am stuck at both the systems.Therefore two different errors on
> different machines.
> Coming back to this error,I want to search within documents that is the
> contents of schema.xml :
> <schema name="documents">
> <fields>
> <field name="id" type="string" indexed="true" stored="true" required="true"
> multiValued="false"/>
> <field name="author" type="string" indexed="true" stored="true"
> multiValued="true"/>
> <field name="comments" type="text" indexed="true" stored="true"
> multiValued="false"/>
> <field name="keywords" type="text" indexed="true" stored="true"
> multiValued="false"/>
> <field name="contents" type="string" indexed="true" stored="true"
> multiValued="false"/>
> <field name="title" type="text" indexed="true" stored="true"
> multiValued="false"/>
> <field name="revision_number" type="string" indexed="true" stored="true"
> multiValued="false"/>
>
> <field name="_version_" type="long" indexed="true" stored="true"
> multiValued="false"/>
> <dynamicField name="ignored_*" type="string" indexed="false" stored="true"
> multiValued="true"/>
> </fields>
> <types>
> <fieldType name="string" class="solr.StrField" />
> <fieldType name="integer" class="solr.IntField" />
> <fieldType name="long" class="solr.LongField" />
>
> <fieldType name="text" class="solr.TextField" >
> <analyzer>
> <tokenizer class="solr.WhitespaceTokenizerFactory"/…
> </analyzer>
> </fieldType>
> <fieldtype name="ignored" stored="false" indexed="false" multiValued="true"
> class="solr.StrField" />
> </types>
> <uniqueKey>id</uniqueKey>
> </schema><schema name="documents">
> <fields>
> <field name="id" type="string" indexed="true" stored="true" required="true"
> multiValued="false"/>
> <field name="author" type="string" indexed="true" stored="true"
> multiValued="true"/>
> <field name="comments" type="text" indexed="true" stored="true"
> multiValued="false"/>
> <field name="keywords" type="text" indexed="true" stored="true"
> multiValued="false"/>
> <field name="contents" type="string" indexed="true" stored="true"
> multiValued="false"/>
> <field name="title" type="text" indexed="true" stored="true"
> multiValued="false"/>
> <field name="revision_number" type="string" indexed="true" stored="true"
> multiValued="false"/>
>
> <field name="_version_" type="long" indexed="true" stored="true"
> multiValued="false"/>
> <dynamicField name="ignored_*" type="string" indexed="false" stored="true"
> multiValued="true"/>
> </fields>
> <types>
> <fieldType name="string" class="solr.StrField" />
> <fieldType name="integer" class="solr.IntField" />
> <fieldType name="long" class="solr.LongField" />
>
> <fieldType name="text" class="solr.TextField" >
> <analyzer>
> <tokenizer class="solr.WhitespaceTokenizerFactory"/…
> </analyzer>
> </fieldType>
> <fieldtype name="ignored" stored="false" indexed="false" multiValued="true"
> class="solr.StrField" />
> </types>
> <uniqueKey>id</uniqueKey>
> </schema>
>
> In my solrconfig I have defined the standard handler for  select as :
> <requestHandler name="standard" class="solr.StandardRequestHandler"
> default="true">
> <lst name="defaults">
>        <int name="rows">20</int>
>        <str name="fl">*</str>
>      </lst>
> </requestHandler>
>
> This is the example doc which i want to search,(this is the output for *:*
> query)
> <doc>
> <str name="id">8</str>
> <arr name="author">
> <str>nutan shinde</str>
> </arr>
> <str name="comments">best book for solr</str>
> <str name="keywords">solr,lucene,apache tika</str>
> <str name="contents">
> solr,lucene is used for search based service.Google works uses web
> crawler.Lucene can implement web crawler
> </str>
> <str name="title">solr enterprise search server</str>
> <str name="revision_number">00123467889767</s…
> &amp;lt;/doc>
>
> I indexed this record through indexing using xml file.
> And I have no idea about copy fields,so  please help me.
> My Tomcat is working normal.
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/searching-within-documents-tp4090173p4091368.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Reply via email to