lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kishan Parmar <kishan....@gmail.com>
Subject Re: Newbie to Solr
Date Tue, 01 Oct 2013 11:16:10 GMT
yes you have to create your own schema
but in schema file you have to add your xml files field name in it like wise
you can add your field name in it ....

or you can add  your filed in the default schema file

whiithout schema you can not add your xml file to solr

my schema is like this
--------------------------------------------------------------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8" ?>
<schema name="example" version="1.5">
<fields>
 <field name="No" type="string" indexed="true" stored="true"
required="true" multiValued="false" />
 <field name="Name" type="string" indexed="true" stored="true"
required="true" multiValued="false" />
 <field name="Address" type="string" indexed="true" stored="true"
required="true" multiValued="false" />
 <field name="Mobile" type="string" indexed="true" stored="true"
required="true" multiValued="false" />
</fields>
<uniqueKey>No</uniqueKey>

<types>

  <fieldType name="string" class="solr.StrField" sortMissingLast="true" />
  <fieldType name="int" class="solr.TrieIntField" precisionStep="0"
positionIncrementGap="0" />
</types>
</schema>
-------------------------------------------------------------------------------------------------------------------------------------------------------------

and my file is like this ,,.,.,.,.

-------------------------------------------------------------------------------------------------------------------------------------------------------------
<add>
    <doc>
        <field name="No">100120107088</field>
        <field name="Name">kishan</field>
        <field name="Address">ghatlodia</field>
        <field name="Mobile">9510077394</field>
    </doc>
</add>

Regards,

Kishan Parmar
Software Developer
+91 95 100 77394
Jay Shree Krishnaa !!



On Tue, Oct 1, 2013 at 1:11 AM, mamta <mamta.alshi@gmail.com> wrote:

> Hi,
>
> I want to know that if i have to fire some query through the Solr admin, do
> i need to create a new schema.xml? Where do i place it incase iahve to
> create a new one.
>
> Incase i can edit the original schema.xml can there be two fields named id
> in my schema.xml?
>
> I desperately need help in running queries on the Solr admin which is
> configured on a Tomcat server.
>
> What all preparation will i need to do? Schema.xml any docs?
>
> Any help will be highly appreciated.
>
> Thanks,
> Mamta
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Newbie-to-Solr-tp4092876.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message