You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by venkatesh uruti <ve...@gmail.com> on 2010/03/05 14:40:00 UTC

example solr xml working fine but my own xml files not working

I am trying to imoport xml file in solr, it is successfully importing, but it
is not showing any results while sarching in solr 

in solr home/example docs/ directory all example xmls are working fine but
when i create a new XML file and trying to upload to solr its not flying

can any one please post the steps to import xml file in solr 
-- 
View this message in context: http://old.nabble.com/example-solr-xml-working-fine-but-my-own-xml-files-not-working-tp27793958p27793958.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: example solr xml working fine but my own xml files not working

Posted by Suram <re...@yahoo.com>.


venkatesh uruti wrote:
> 
> I am trying to imoport xml file in solr, it is successfully importing, but
> it is not showing any results while sarching in solr 
> 
> in solr home/example docs/ directory all example xmls are working fine but
> when i create a new XML file and trying to upload to solr its not flying
> 
> can any one please post the steps to import xml file in solr 
> 

create new fields and type in schema for what you have in your own xml

-- 
View this message in context: http://old.nabble.com/example-solr-xml-working-fine-but-my-own-xml-files-not-working-tp27793958p27802042.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: example solr xml working fine but my own xml files not working

Posted by Erick Erickson <er...@gmail.com>.
Well, all I can say is that a fresh download of 1.4.1 and cutting and
pasting your exact fields and putting them into my schema.xml,
copying and pasting your exact document into a new document
and indexing it (./post.jar eoe.xml) and then running any of the
4 queries you indicated works fine for me.

Are you absolutely, positively sure that the only changes you made
to your schema.xml file was adding those lines? Because my best
guess is you made some "innocent" change there that wasn't so
innocent. WordDelimiterFilter in the fieldType would be a good candidate.

So, again, post the relevant fieldType definitions from your schema.xml
file. That is, the definition for "text", i.e.
<fieldType name="text" class="solr.TextField" positionIncrementGap="100">
blah blah blah
</fieldType>

And post the results of debugQuery=on. This is easily done from the
admin page here: http://localhost:8983/solr/admin/form.jsp
(it's the link to "full interface" from the admin page) and checking
the "debug:enable" checkbox.

Or get a fresh copy of the schema file and add your changes anew
and try reindexing.

HTH
Erick

On Sun, Jun 27, 2010 at 5:58 PM, Ahmet Arslan <io...@yahoo.com> wrote:

> > Yes, it does show results when I search for id:ZS00001,
> > COL:RW, and TI:MAC,
> > but strangely it does not show results when I try
> > AD:ZS00001 or AN:ZS00001.
>
> What is the output of q=AD:ZS00001&debugQuery=on
>
> > Also, I'm not sure where to find the default field, so I'm
> > fairly certain I didn't change it.
>
> Default search field declaration is in schema.xml between
>
> <defaultSearchField>  </defaultSearchField> tags.
>
> Can you paste field type definition of text? <fieldType name="text" ...
>
>
>
>

Re: example solr xml working fine but my own xml files not working

Posted by Binesh Gummadi <bg...@rivetlogic.com>.
Jeff,

It should be in schema.xml at the end of the file. Look for the following.

 <!-- field for the QueryParser to use when an explicit fieldname is absent
-->
 <defaultSearchField>all</defaultSearchField>

To copy your fields to the default search field you should have something
like this.

<copyField source="AD" dest="all"/>
<copyField source="AN" dest="all"/>
<copyField source="COL" dest="all"/>
<copyField source="TI" dest="all"/>

Once you do that you should be able to search for ZS00001. As others
suggested you should look at your index using Luke. That might give you a
clue on whats happening. Solr analyzer is another great resource.
http://localhost:8983/solr/admin/analysis.jsp?highlight=on. Make sure you
select verbose check boxes and enter your fieldname(AD or AN), field value
ZS00001 and query value ZS00001. See how it is indexed and queried in the
output.

Hope that helps. Good luck.

Binesh Gummadi

On Sun, Jun 27, 2010 at 5:37 PM, codar <je...@gmail.com> wrote:

>
> Binesh,
>
> Great advice.
>
> Yes, it does show results when I search for id:ZS00001, COL:RW, and TI:MAC,
> but strangely it does not show results when I try AD:ZS00001 or AN:ZS00001.
> Also, I'm not sure where to find the default field, so I'm fairly certain I
> didn't change it.  I'm entering the querytext in the  "Make a Query"
> section
> of the Solr Admin page (http://localhost:8983/solr/admin/).
>
> Here's the result of my query(id:ZS0001):
>
> <response>
>
> <lst name="responseHeader">
>  <int name="status">0</int>
>  <int name="QTime">129</int>
>  <lst name="params">
>  <str name="indent">on</str>
>  <str name="rows">10</str>
>
>  <str name="start">0</str>
>  <str name="q">id:ZS00001</str>
>  <str name="version">2.2</str>
>  </lst>
> </lst>
> <result name="response" numFound="1" start="0">
>  <doc>
>  <arr name="AD"><str>ZS00001</str></arr>
>
>  <arr name="AN"><str>ZS00001</str></arr>
>  <arr name="COL"><str>RW</str></arr>
>  <arr name="TI"><str>How to index Solr on the Mac</str></arr>
>  <str name="id">ZS00001</str>
>  </doc>
> </result>
> </response>
>
>
> I'm reposting the data I indexed and the field definitions:
>
> Here's the data:
> <add><doc>
>                <field name="id">ZS00001</field>
>                <field name="AD">ZS00001</field>
>                 <field name="AN">ZS00001</field>
>                 <field name="COL">RW</field>
>                <field name="TI">How to index Solr on the Mac</field>
> </doc></add>
>
> Here's the schema.xml definitions:
>
>                <field name="AD" type="text" indexed="true" stored="true"
>                        multiValued="true" />
>                 <field name="AN" type="text" indexed="true" stored="true"
>                         multiValued="true" />
>                <field name="COL" type="text" indexed="true" stored="true"
>                        multiValued="true" />
>                <field name="TI" type="text" indexed="true" stored="true"
>                        multiValued="true" />
>
> Thanks again for all the help!!
>
> Jeff
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/example-solr-xml-working-fine-but-my-own-xml-files-not-working-tp504245p926340.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: example solr xml working fine but my own xml files not working

Posted by Ahmet Arslan <io...@yahoo.com>.
> Yes, it does show results when I search for id:ZS00001,
> COL:RW, and TI:MAC,
> but strangely it does not show results when I try
> AD:ZS00001 or AN:ZS00001. 

What is the output of q=AD:ZS00001&debugQuery=on

> Also, I'm not sure where to find the default field, so I'm
> fairly certain I didn't change it.  

Default search field declaration is in schema.xml between 

<defaultSearchField>  </defaultSearchField> tags.

Can you paste field type definition of text? <fieldType name="text" ...


      

Re: example solr xml working fine but my own xml files not working

Posted by codar <je...@gmail.com>.
Binesh,

Great advice. 

Yes, it does show results when I search for id:ZS00001, COL:RW, and TI:MAC,
but strangely it does not show results when I try AD:ZS00001 or AN:ZS00001. 
Also, I'm not sure where to find the default field, so I'm fairly certain I
didn't change it.  I'm entering the querytext in the  "Make a Query" section
of the Solr Admin page (http://localhost:8983/solr/admin/).

Here's the result of my query(id:ZS0001):

<response>

<lst name="responseHeader">
 <int name="status">0</int>
 <int name="QTime">129</int>
 <lst name="params">
  <str name="indent">on</str>
  <str name="rows">10</str>

  <str name="start">0</str>
  <str name="q">id:ZS00001</str>
  <str name="version">2.2</str>
 </lst>
</lst>
<result name="response" numFound="1" start="0">
 <doc>
  <arr name="AD"><str>ZS00001</str></arr>

  <arr name="AN"><str>ZS00001</str></arr>
  <arr name="COL"><str>RW</str></arr>
  <arr name="TI"><str>How to index Solr on the Mac</str></arr>
  <str name="id">ZS00001</str>
 </doc>
</result>
</response>


I'm reposting the data I indexed and the field definitions:

Here's the data:
<add><doc> 
                <field name="id">ZS00001</field> 
                <field name="AD">ZS00001</field> 
                <field name="AN">ZS00001</field>
                <field name="COL">RW</field> 
                <field name="TI">How to index Solr on the Mac</field> 
</doc></add>

Here's the schema.xml definitions:

                <field name="AD" type="text" indexed="true" stored="true" 
                        multiValued="true" /> 
                <field name="AN" type="text" indexed="true" stored="true" 
                        multiValued="true" /> 
                <field name="COL" type="text" indexed="true" stored="true" 
                        multiValued="true" /> 
                <field name="TI" type="text" indexed="true" stored="true" 
                        multiValued="true" />

Thanks again for all the help!!

Jeff


-- 
View this message in context: http://lucene.472066.n3.nabble.com/example-solr-xml-working-fine-but-my-own-xml-files-not-working-tp504245p926340.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: example solr xml working fine but my own xml files not working

Posted by Binesh Gummadi <bg...@rivetlogic.com>.
What is the default search field? Is it "ALL" or did you change it? If it is
"ALL" are you copying your data to ALL?
Instead of searching for "*:*" does it show results if you search for
"id:ZS00001"?

Binesh Gummadi

On Sun, Jun 27, 2010 at 2:12 PM, codar <je...@gmail.com> wrote:

>
> Thanks for the link to "how to post" - not sure how to interpret that.  I
> already posted the fields definition from the schema, the query I'm trying
> to submit, and the results.  I'm not sure what more I can post.  I get 0
> results, and when I turn debug on it doesn't provide anything meaningful.
> Please reread my other posts for the answers to your questions.
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/example-solr-xml-working-fine-but-my-own-xml-files-not-working-tp504245p926031.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: example solr xml working fine but my own xml files not working

Posted by codar <je...@gmail.com>.
Thanks for the link to "how to post" - not sure how to interpret that.  I
already posted the fields definition from the schema, the query I'm trying
to submit, and the results.  I'm not sure what more I can post.  I get 0
results, and when I turn debug on it doesn't provide anything meaningful. 
Please reread my other posts for the answers to your questions.
-- 
View this message in context: http://lucene.472066.n3.nabble.com/example-solr-xml-working-fine-but-my-own-xml-files-not-working-tp504245p926031.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: example solr xml working fine but my own xml files not working

Posted by Erick Erickson <er...@gmail.com>.
Most likely explanation: the Analyzer you're using at
query time isn't matching what the Analyzer does
at index time. For instance, the casing is different
(or a myriad of other things). Or you're not actually
querying on the field you think you are.

Please post the definitions for the field from your
schema file. Post the queries you're attempting.
Post the results of your query with
&debug=on. I agree it's probably something simple,
but without seeing what you're doing it's hard to
guess.

You might take a look at:
http://wiki.apache.org/solr/UsingMailingLists

Best
Erick


On Sat, Jun 26, 2010 at 7:18 PM, codar <je...@gmail.com> wrote:

>
> To add to my last, when I query *:* I get the results I expect, but if I
> query a term (ZS00002) it doesn't find any matches.  I must be missing
> something simple.  I'm new to solr, so it's possible I just don't
> understand
> how to query it.
>
> Jeff
>
> On Sat, Jun 26, 2010 at 6:42 PM, Jeff Kemble <je...@gmail.com>
> wrote:
>
> > Thanks, Erik.
> >
> > I downloaded Luke and pointed it to my index.  I can see the data I
> indexed
> > via Luke, but still can't query it through the admin console.  I queried
> for
> > ZS00001 and still got no results, but when I look at the index via Luke,
> I
> > see the document was indexed.  I'm stumped.
> >
> > Jeff
> >
> >
> > On Sat, Jun 26, 2010 at 2:54 PM, Erick Erickson [via Lucene] <
> > ml-node+924591-989457010-302532@n3.nabble.com<ml...@n3.nabble.com>
> <ml...@n3.nabble.com>
> >
> > > wrote:
> >
> >> The first place you should go for this type of question is the
> >> solr admin page and look at what's actually in your index.
> >>
> >> A very handy tool for this is also Luke. Get a copy of it (google
> >> Lucene Luke) and point it at your index and poke around
> >> to see if what's actually in your index is what you expect.
> >>
> >> If that all doesn't help, post more information. Particularly
> >> what query you're submitting that you expect to return
> >> results.
> >>
> >> Also, try executing the query with &debugQuery=on, that may
> >> give you some clues (also note that there's a checkbox on the
> >> Admin page for debug info if you go to the "full interface"
> >>
> >> HTH
> >> Erick
> >>
> >> On Sat, Jun 26, 2010 at 8:46 AM, codar <[hidden email]<
> http://user/SendEmail.jtp?type=node&node=924591&i=0>>
> >> wrote:
> >>
> >> >
> >> > I'm struggling with this very same problem.  I can index the example
> >> files
> >> > fine. When I try adding a custom file, it appears to index without
> >> issue;
> >> > but I get no search results via the admin console.  I've also tried
> >> > modifying one of the files (monitor.xml); it also did not update.  I'm
> >> > using
> >> > solr 1.4.1 on a MAC.  Any help would be greatly appreciated.
> >> >
> >> > I added these fields to the schema.xml
> >> >                <field name="AD" type="text" indexed="true"
> stored="true"
> >>
> >> >                        multiValued="true" />
> >> >                <field name="COL" type="text" indexed="true"
> >> stored="true"
> >> >                        multiValued="true" />
> >> >                <field name="TI" type="text" indexed="true"
> stored="true"
> >>
> >> >                        multiValued="true" />
> >> >
> >> > Here's my custom xml:
> >> >
> >> > <add><doc>
> >> >                <field name="id">ZS00001</field>
> >> >                <field name="AD">ZS00001</field>
> >> >                <field name="COL">RW</field>
> >> >                <field name="TI">How to index Solr on the Mac</field>
> >> > </doc></add>
> >> >
> >> > I cd to the exampledocs dir and run: java -jar post.jar my_data.xml
> >> >
> >> > Here are the results:
> >> >
> >> > SimplePostTool: version 1.2
> >> > SimplePostTool: WARNING: Make sure your XML documents are encoded in
> >> UTF-8,
> >> > other encodings are not currently supported
> >> > SimplePostTool: POSTing files to http://localhost:8983/solr/update..
> >> > SimplePostTool: POSTing file tr_single.xml
> >> > SimplePostTool: COMMITting Solr index changes..
> >> >
> >> > So, it appears to have indexed without issue, but yet when I search
> for
> >> the
> >> > ZS00001, I get not results.
> >> >
> >> > Thanks in advance
> >> >
> >> >
> >> > --
> >> > View this message in context:
> >> >
> >>
> http://lucene.472066.n3.nabble.com/example-solr-xml-working-fine-but-my-own-xml-files-not-working-tp504245p924113.html
> <
> http://lucene.472066.n3.nabble.com/example-solr-xml-working-fine-but-my-own-xml-files-not-working-tp504245p924113.html?by-user=t
> >
> >> > Sent from the Solr - User mailing list archive at Nabble.com.
> >> >
> >>
> >>
> >> ------------------------------
> >>  View message @
> >>
> http://lucene.472066.n3.nabble.com/example-solr-xml-working-fine-but-my-own-xml-files-not-working-tp504245p924591.html
> >> To unsubscribe from Re: example solr xml working fine but my own xml
> files
> >> not working, click here< (link removed) =>.
> >>
> >>
> >>
> >
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/example-solr-xml-working-fine-but-my-own-xml-files-not-working-tp504245p924880.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: example solr xml working fine but my own xml files not working

Posted by codar <je...@gmail.com>.
To add to my last, when I query *:* I get the results I expect, but if I
query a term (ZS00002) it doesn't find any matches.  I must be missing
something simple.  I'm new to solr, so it's possible I just don't understand
how to query it.

Jeff

On Sat, Jun 26, 2010 at 6:42 PM, Jeff Kemble <je...@gmail.com> wrote:

> Thanks, Erik.
>
> I downloaded Luke and pointed it to my index.  I can see the data I indexed
> via Luke, but still can't query it through the admin console.  I queried for
> ZS00001 and still got no results, but when I look at the index via Luke, I
> see the document was indexed.  I'm stumped.
>
> Jeff
>
>
> On Sat, Jun 26, 2010 at 2:54 PM, Erick Erickson [via Lucene] <
> ml-node+924591-989457010-302532@n3.nabble.com<ml...@n3.nabble.com>
> > wrote:
>
>> The first place you should go for this type of question is the
>> solr admin page and look at what's actually in your index.
>>
>> A very handy tool for this is also Luke. Get a copy of it (google
>> Lucene Luke) and point it at your index and poke around
>> to see if what's actually in your index is what you expect.
>>
>> If that all doesn't help, post more information. Particularly
>> what query you're submitting that you expect to return
>> results.
>>
>> Also, try executing the query with &debugQuery=on, that may
>> give you some clues (also note that there's a checkbox on the
>> Admin page for debug info if you go to the "full interface"
>>
>> HTH
>> Erick
>>
>> On Sat, Jun 26, 2010 at 8:46 AM, codar <[hidden email]<http://user/SendEmail.jtp?type=node&node=924591&i=0>>
>> wrote:
>>
>> >
>> > I'm struggling with this very same problem.  I can index the example
>> files
>> > fine. When I try adding a custom file, it appears to index without
>> issue;
>> > but I get no search results via the admin console.  I've also tried
>> > modifying one of the files (monitor.xml); it also did not update.  I'm
>> > using
>> > solr 1.4.1 on a MAC.  Any help would be greatly appreciated.
>> >
>> > I added these fields to the schema.xml
>> >                <field name="AD" type="text" indexed="true" stored="true"
>>
>> >                        multiValued="true" />
>> >                <field name="COL" type="text" indexed="true"
>> stored="true"
>> >                        multiValued="true" />
>> >                <field name="TI" type="text" indexed="true" stored="true"
>>
>> >                        multiValued="true" />
>> >
>> > Here's my custom xml:
>> >
>> > <add><doc>
>> >                <field name="id">ZS00001</field>
>> >                <field name="AD">ZS00001</field>
>> >                <field name="COL">RW</field>
>> >                <field name="TI">How to index Solr on the Mac</field>
>> > </doc></add>
>> >
>> > I cd to the exampledocs dir and run: java -jar post.jar my_data.xml
>> >
>> > Here are the results:
>> >
>> > SimplePostTool: version 1.2
>> > SimplePostTool: WARNING: Make sure your XML documents are encoded in
>> UTF-8,
>> > other encodings are not currently supported
>> > SimplePostTool: POSTing files to http://localhost:8983/solr/update..
>> > SimplePostTool: POSTing file tr_single.xml
>> > SimplePostTool: COMMITting Solr index changes..
>> >
>> > So, it appears to have indexed without issue, but yet when I search for
>> the
>> > ZS00001, I get not results.
>> >
>> > Thanks in advance
>> >
>> >
>> > --
>> > View this message in context:
>> >
>> http://lucene.472066.n3.nabble.com/example-solr-xml-working-fine-but-my-own-xml-files-not-working-tp504245p924113.html<http://lucene.472066.n3.nabble.com/example-solr-xml-working-fine-but-my-own-xml-files-not-working-tp504245p924113.html?by-user=t>
>> > Sent from the Solr - User mailing list archive at Nabble.com.
>> >
>>
>>
>> ------------------------------
>>  View message @
>> http://lucene.472066.n3.nabble.com/example-solr-xml-working-fine-but-my-own-xml-files-not-working-tp504245p924591.html
>> To unsubscribe from Re: example solr xml working fine but my own xml files
>> not working, click here< (link removed) =>.
>>
>>
>>
>

-- 
View this message in context: http://lucene.472066.n3.nabble.com/example-solr-xml-working-fine-but-my-own-xml-files-not-working-tp504245p924880.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: example solr xml working fine but my own xml files not working

Posted by codar <je...@gmail.com>.
Thanks, Erik.

I downloaded Luke and pointed it to my index.  I can see the data I indexed
via Luke, but still can't query it through the admin console.  I queried for
ZS00001 and still got no results, but when I look at the index via Luke, I
see the document was indexed.  I'm stumped.

Jeff

On Sat, Jun 26, 2010 at 2:54 PM, Erick Erickson [via Lucene] <
ml-node+924591-989457010-302532@n3.nabble.com<ml...@n3.nabble.com>
> wrote:

> The first place you should go for this type of question is the
> solr admin page and look at what's actually in your index.
>
> A very handy tool for this is also Luke. Get a copy of it (google
> Lucene Luke) and point it at your index and poke around
> to see if what's actually in your index is what you expect.
>
> If that all doesn't help, post more information. Particularly
> what query you're submitting that you expect to return
> results.
>
> Also, try executing the query with &debugQuery=on, that may
> give you some clues (also note that there's a checkbox on the
> Admin page for debug info if you go to the "full interface"
>
> HTH
> Erick
>
> On Sat, Jun 26, 2010 at 8:46 AM, codar <[hidden email]<http://user/SendEmail.jtp?type=node&node=924591&i=0>>
> wrote:
>
> >
> > I'm struggling with this very same problem.  I can index the example
> files
> > fine. When I try adding a custom file, it appears to index without issue;
>
> > but I get no search results via the admin console.  I've also tried
> > modifying one of the files (monitor.xml); it also did not update.  I'm
> > using
> > solr 1.4.1 on a MAC.  Any help would be greatly appreciated.
> >
> > I added these fields to the schema.xml
> >                <field name="AD" type="text" indexed="true" stored="true"
> >                        multiValued="true" />
> >                <field name="COL" type="text" indexed="true" stored="true"
>
> >                        multiValued="true" />
> >                <field name="TI" type="text" indexed="true" stored="true"
> >                        multiValued="true" />
> >
> > Here's my custom xml:
> >
> > <add><doc>
> >                <field name="id">ZS00001</field>
> >                <field name="AD">ZS00001</field>
> >                <field name="COL">RW</field>
> >                <field name="TI">How to index Solr on the Mac</field>
> > </doc></add>
> >
> > I cd to the exampledocs dir and run: java -jar post.jar my_data.xml
> >
> > Here are the results:
> >
> > SimplePostTool: version 1.2
> > SimplePostTool: WARNING: Make sure your XML documents are encoded in
> UTF-8,
> > other encodings are not currently supported
> > SimplePostTool: POSTing files to http://localhost:8983/solr/update..
> > SimplePostTool: POSTing file tr_single.xml
> > SimplePostTool: COMMITting Solr index changes..
> >
> > So, it appears to have indexed without issue, but yet when I search for
> the
> > ZS00001, I get not results.
> >
> > Thanks in advance
> >
> >
> > --
> > View this message in context:
> >
> http://lucene.472066.n3.nabble.com/example-solr-xml-working-fine-but-my-own-xml-files-not-working-tp504245p924113.html<http://lucene.472066.n3.nabble.com/example-solr-xml-working-fine-but-my-own-xml-files-not-working-tp504245p924113.html?by-user=t>
> > Sent from the Solr - User mailing list archive at Nabble.com.
> >
>
>
> ------------------------------
>  View message @
> http://lucene.472066.n3.nabble.com/example-solr-xml-working-fine-but-my-own-xml-files-not-working-tp504245p924591.html
> To unsubscribe from Re: example solr xml working fine but my own xml files
> not working, click here< (link removed) =>.
>
>
>

-- 
View this message in context: http://lucene.472066.n3.nabble.com/example-solr-xml-working-fine-but-my-own-xml-files-not-working-tp504245p924851.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: example solr xml working fine but my own xml files not working

Posted by Erick Erickson <er...@gmail.com>.
The first place you should go for this type of question is the
solr admin page and look at what's actually in your index.

A very handy tool for this is also Luke. Get a copy of it (google
Lucene Luke) and point it at your index and poke around
to see if what's actually in your index is what you expect.

If that all doesn't help, post more information. Particularly
what query you're submitting that you expect to return
results.

Also, try executing the query with &debugQuery=on, that may
give you some clues (also note that there's a checkbox on the
Admin page for debug info if you go to the "full interface"

HTH
Erick

On Sat, Jun 26, 2010 at 8:46 AM, codar <je...@gmail.com> wrote:

>
> I'm struggling with this very same problem.  I can index the example files
> fine. When I try adding a custom file, it appears to index without issue;
> but I get no search results via the admin console.  I've also tried
> modifying one of the files (monitor.xml); it also did not update.  I'm
> using
> solr 1.4.1 on a MAC.  Any help would be greatly appreciated.
>
> I added these fields to the schema.xml
>                <field name="AD" type="text" indexed="true" stored="true"
>                        multiValued="true" />
>                <field name="COL" type="text" indexed="true" stored="true"
>                        multiValued="true" />
>                <field name="TI" type="text" indexed="true" stored="true"
>                        multiValued="true" />
>
> Here's my custom xml:
>
> <add><doc>
>                <field name="id">ZS00001</field>
>                <field name="AD">ZS00001</field>
>                <field name="COL">RW</field>
>                <field name="TI">How to index Solr on the Mac</field>
> </doc></add>
>
> I cd to the exampledocs dir and run: java -jar post.jar my_data.xml
>
> Here are the results:
>
> SimplePostTool: version 1.2
> SimplePostTool: WARNING: Make sure your XML documents are encoded in UTF-8,
> other encodings are not currently supported
> SimplePostTool: POSTing files to http://localhost:8983/solr/update..
> SimplePostTool: POSTing file tr_single.xml
> SimplePostTool: COMMITting Solr index changes..
>
> So, it appears to have indexed without issue, but yet when I search for the
> ZS00001, I get not results.
>
> Thanks in advance
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/example-solr-xml-working-fine-but-my-own-xml-files-not-working-tp504245p924113.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: example solr xml working fine but my own xml files not working

Posted by codar <je...@gmail.com>.
I'm struggling with this very same problem.  I can index the example files
fine. When I try adding a custom file, it appears to index without issue;
but I get no search results via the admin console.  I've also tried
modifying one of the files (monitor.xml); it also did not update.  I'm using
solr 1.4.1 on a MAC.  Any help would be greatly appreciated.

I added these fields to the schema.xml
                <field name="AD" type="text" indexed="true" stored="true"
                        multiValued="true" />
                <field name="COL" type="text" indexed="true" stored="true"
                        multiValued="true" />
                <field name="TI" type="text" indexed="true" stored="true"
                        multiValued="true" />

Here's my custom xml:

<add><doc>
                <field name="id">ZS00001</field>
                <field name="AD">ZS00001</field>
                <field name="COL">RW</field>
                <field name="TI">How to index Solr on the Mac</field>
</doc></add>

I cd to the exampledocs dir and run: java -jar post.jar my_data.xml

Here are the results:

SimplePostTool: version 1.2
SimplePostTool: WARNING: Make sure your XML documents are encoded in UTF-8,
other encodings are not currently supported
SimplePostTool: POSTing files to http://localhost:8983/solr/update..
SimplePostTool: POSTing file tr_single.xml
SimplePostTool: COMMITting Solr index changes..

So, it appears to have indexed without issue, but yet when I search for the
ZS00001, I get not results.

Thanks in advance


-- 
View this message in context: http://lucene.472066.n3.nabble.com/example-solr-xml-working-fine-but-my-own-xml-files-not-working-tp504245p924113.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: example solr xml working fine but my own xml files not working

Posted by Erick Erickson <er...@gmail.com>.
Have you looked in your SOLR log file to see what that says?

Check the editor you use for your XML. is it using UTF-8 (although you
don't appear to be using any odd characters, probably not a problem).

Think about taking the xml file that *does* work, copying it and editing
*that* one.

Erick

On Mon, Mar 8, 2010 at 12:13 AM, venkatesh uruti
<ve...@gmail.com>wrote:

>
> Dear Eric,
>
> Please find below necessary steps that executed.
>
> Iam following same structure as mentioned by you, and checked  results in
> the admin page by clicking search button, samples are working fine.
>
> Ex:Added monitor.xml and search for video its displaying results-----
> search
> content is displaying properly
>
> Let me explain you the problem which iam facing:
>
> step 1: I started Apache tomcat
>
> step2 : Indexing Data
>           java -jar post.jar myfile.xml
>
> Here is my XML content:
>
> <add>
>
>     <doc>
>          <field name="id">11111</field>
>          <field name="name">Youth to Elder</field>
>          <field name="Author"> Integrated Research Program</field>
>          <field name="Year">2009</field>
>          <field name="Publisher"> First Nation</field>
>     </doc>
>     <doc>
>          <field name="id">22222</field>
>          <field name="name">Strategies </field>
>          <field name="Author">Implementation Committee </field>
>          <field name="Year">2001</field>
>          <field name="Publisher">Policy</field>
>
>     </doc>
>
> </add>
> Step 4 : i did
>
>         java -jar post.jar myfile.xml
>
>
> output of above one:
>
> SimplePostTool: version 1.2
> SimplePostTool: WARNING: Make sure your XML documents are encoded in UTF-8,
> othe
> r encodings are not currently supported
> SimplePostTool: POSTing files to http://localhost:8983/solr/update..
> SimplePostTool: POSTing file curnew.xml
> SimplePostTool: FATAL: Solr returned an error: Bad Request
>
> Request to help me on this.
>
> --
> View this message in context:
> http://old.nabble.com/example-solr-xml-working-fine-but-my-own-xml-files-not-working-tp27793958p27817161.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>

Re: example solr xml working fine but my own xml files not working

Posted by venkatesh uruti <ve...@gmail.com>.
Dear Eric,

Please find below necessary steps that executed.

Iam following same structure as mentioned by you, and checked  results in
the admin page by clicking search button, samples are working fine. 

Ex:Added monitor.xml and search for video its displaying results----- search
content is displaying properly

Let me explain you the problem which iam facing:

step 1: I started Apache tomcat 

step2 : Indexing Data 
           java -jar post.jar myfile.xml
          
Here is my XML content:

<add>

     <doc>
          <field name="id">11111</field>
          <field name="name">Youth to Elder</field>
          <field name="Author"> Integrated Research Program</field>
          <field name="Year">2009</field>
          <field name="Publisher"> First Nation</field>
     </doc>
     <doc>
          <field name="id">22222</field>
          <field name="name">Strategies </field>
          <field name="Author">Implementation Committee </field>
          <field name="Year">2001</field>
          <field name="Publisher">Policy</field>
         
     </doc>

</add>
Step 4 : i did

         java -jar post.jar myfile.xml 


output of above one:

SimplePostTool: version 1.2
SimplePostTool: WARNING: Make sure your XML documents are encoded in UTF-8,
othe
r encodings are not currently supported
SimplePostTool: POSTing files to http://localhost:8983/solr/update..
SimplePostTool: POSTing file curnew.xml
SimplePostTool: FATAL: Solr returned an error: Bad Request

Request to help me on this. 

-- 
View this message in context: http://old.nabble.com/example-solr-xml-working-fine-but-my-own-xml-files-not-working-tp27793958p27817161.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: example solr xml working fine but my own xml files not working

Posted by Erick Erickson <er...@gmail.com>.
Does your new xml follow the same structure of the
example? That is,
<add>
<doc>
<fielda></fielda>
<fieldb></fieldb>
</doc>
</add>

?
Have you tried looking at the results with the admin page
to see what's actually in your index?

More data please. What did you do to try to index your
new data? What response did SOLR give? etc....

Erick

On Fri, Mar 5, 2010 at 8:40 AM, venkatesh uruti
<ve...@gmail.com>wrote:

>
> I am trying to imoport xml file in solr, it is successfully importing, but
> it
> is not showing any results while sarching in solr
>
> in solr home/example docs/ directory all example xmls are working fine but
> when i create a new XML file and trying to upload to solr its not flying
>
> can any one please post the steps to import xml file in solr
> --
> View this message in context:
> http://old.nabble.com/example-solr-xml-working-fine-but-my-own-xml-files-not-working-tp27793958p27793958.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
>