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 bibhor <bi...@gmail.com> on 2013/01/14 04:38:17 UTC

RSS tutorial that comes with the apache-solr not indexing

Hi
I am trying to use the RSS tutorial that comes with the apache-solr.
I am not sure if I missed anything but when I do full-import no indexing
happens.
These are the steps that I am taking:

1) Download apache-solr-3.6.2 (http://lucene.apache.org/solr/)
2) Start the solr by doing: java -Dsolr.solr.home="./example-DIH/solr/" -jar
start.jar
3) Goto url:
http://192.168.1.12:8983/solr/rss/dataimport?command=full-import
4) When I do this it says: Indexing completed. Added/Updated: 0 documents.
Deleted 0 documents.

Now I know that the default example is getting the RSS from:
http://rss.slashdot.org/Slashdot/slashdot
This default example is empty when I view it in chrome. It does have XML
data in the source but I am not sure if this has anything to do with the
import failure.
 
I also modified the rss-config so that I can test other RSS sources. I used
http://www.feedforall.com/sample.xml and updated the rss-config.xml but this
did the same and did not Add/Update any documents.
Any help is appreciated.



--
View this message in context: http://lucene.472066.n3.nabble.com/RSS-tutorial-that-comes-with-the-apache-solr-not-indexing-tp4033067.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: RSS tutorial that comes with the apache-solr not indexing

Posted by Gora Mohanty <go...@mimirtech.com>.
On 15 January 2013 00:38, Alexandre Rafalovitch <ar...@gmail.com> wrote:
> Is that something that needs to be updated in the example schema as well
> then?

The example rss-data-config.xml references
http://rss.slashdot.org/Slashdot/slashdot which
seems to be broken at the moment, at least
for me. This is the same URL as on the Slashdot
home page, so not sure what is going on.

Regards,
Gora

Re: RSS tutorial that comes with the apache-solr not indexing

Posted by Steve Rowe <sa...@gmail.com>.
Yes, thanks Alex, I've fixed solr/example/example-DIH/solr/rss/conf/rss-data-config.xml

On Jan 14, 2013, at 2:08 PM, Alexandre Rafalovitch <ar...@gmail.com> wrote:

> Is that something that needs to be updated in the example schema as well
> then?
> 
> Regards,
>   Alex.
> 
> Personal blog: http://blog.outerthoughts.com/
> LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
> - Time is the quality of nature that keeps events from happening all at
> once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD book)
> 
> 
> On Mon, Jan 14, 2013 at 1:51 PM, bibhor <bi...@gmail.com> wrote:
> 
>> Hi Steve
>> Thank you for your help. After I updated the rss-data-config to following,
>> it worked.
>> 
>> <dataConfig>
>>    <dataSource type="URLDataSource" />
>>    <document>
>>        <entity name="rsstest"
>>                pk="link"
>>                url="http://www.feedforall.com/sample.xml"
>>                processor="XPathEntityProcessor"
>>                forEach="/rss/channel/item"
>>                transformer="DateFormatTransformer">
>> 
>>            <field column="title" xpath="/rss/channel/item/title" />
>>            <field column="link" xpath="/rss/channel/item/link" />
>>        </entity>
>>    </document>
>> </dataConfig>
>> 
>> 
>> 
>> --
>> View this message in context:
>> http://lucene.472066.n3.nabble.com/RSS-tutorial-that-comes-with-the-apache-solr-not-indexing-tp4033067p4033254.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>> 


Re: RSS tutorial that comes with the apache-solr not indexing

Posted by Alexandre Rafalovitch <ar...@gmail.com>.
Is that something that needs to be updated in the example schema as well
then?

Regards,
   Alex.

Personal blog: http://blog.outerthoughts.com/
LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
- Time is the quality of nature that keeps events from happening all at
once. Lately, it doesn't seem to be working.  (Anonymous  - via GTD book)


On Mon, Jan 14, 2013 at 1:51 PM, bibhor <bi...@gmail.com> wrote:

> Hi Steve
> Thank you for your help. After I updated the rss-data-config to following,
> it worked.
>
> <dataConfig>
>     <dataSource type="URLDataSource" />
>     <document>
>         <entity name="rsstest"
>                 pk="link"
>                 url="http://www.feedforall.com/sample.xml"
>                 processor="XPathEntityProcessor"
>                 forEach="/rss/channel/item"
>                 transformer="DateFormatTransformer">
>
>             <field column="title" xpath="/rss/channel/item/title" />
>             <field column="link" xpath="/rss/channel/item/link" />
>         </entity>
>     </document>
> </dataConfig>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/RSS-tutorial-that-comes-with-the-apache-solr-not-indexing-tp4033067p4033254.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: RSS tutorial that comes with the apache-solr not indexing

Posted by bibhor <bi...@gmail.com>.
Hi Steve
Thank you for your help. After I updated the rss-data-config to following,
it worked.

<dataConfig>
    <dataSource type="URLDataSource" />
    <document>
        <entity name="rsstest"
                pk="link"
                url="http://www.feedforall.com/sample.xml"
                processor="XPathEntityProcessor"
                forEach="/rss/channel/item"
                transformer="DateFormatTransformer">

            <field column="title" xpath="/rss/channel/item/title" />
            <field column="link" xpath="/rss/channel/item/link" />
        </entity>
    </document>
</dataConfig>



--
View this message in context: http://lucene.472066.n3.nabble.com/RSS-tutorial-that-comes-with-the-apache-solr-not-indexing-tp4033067p4033254.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: RSS tutorial that comes with the apache-solr not indexing

Posted by Steve Rowe <sa...@gmail.com>.
Hi bibhor,

I looked at <http://rss.slashdot.org/Slashdot/slashdot> and <http://www.feedforall.com/sample.xml>, and their top-level structure is:

<rss>
  <channel>
    ...

This doesn't match your <entity ... forEach="/RDF/channel" ... > or your <field column="..." xpath="/RDF/item/..." />

Steve

On Jan 14, 2013, at 1:02 PM, bibhor <bi...@gmail.com> wrote:

> Hi,
> I did try another RSS from here "http://www.feedforall.com/sample.xml" but
> it also didnt work and came back with same message saying it indexed 0
> documents.
> 
> This is my data from rss-data-config.xml
> 
> <dataConfig>
>    <dataSource type="URLDataSource" />
>    <document>
>        <entity name="rsstest"
>                pk="link"
>                url="http://www.feedforall.com/sample.xml"
>                processor="XPathEntityProcessor"
>                forEach="/RDF/channel | /RDF/item"
>                transformer="DateFormatTransformer">
> 
>            <field column="title" xpath="/RDF/item/title" />
>            <field column="link" xpath="/RDF/item/link" />
>        </entity>
>    </document>
> </dataConfig>
> 
> 
> 
> 
> 
> 
> 
> --
> View this message in context: http://lucene.472066.n3.nabble.com/RSS-tutorial-that-comes-with-the-apache-solr-not-indexing-tp4033067p4033230.html
> Sent from the Solr - User mailing list archive at Nabble.com.


Re: RSS tutorial that comes with the apache-solr not indexing

Posted by bibhor <bi...@gmail.com>.
Hi,
I did try another RSS from here "http://www.feedforall.com/sample.xml" but
it also didnt work and came back with same message saying it indexed 0
documents.

This is my data from rss-data-config.xml

<dataConfig>
    <dataSource type="URLDataSource" />
    <document>
        <entity name="rsstest"
                pk="link"
                url="http://www.feedforall.com/sample.xml"
                processor="XPathEntityProcessor"
                forEach="/RDF/channel | /RDF/item"
                transformer="DateFormatTransformer">

            <field column="title" xpath="/RDF/item/title" />
            <field column="link" xpath="/RDF/item/link" />
        </entity>
    </document>
</dataConfig>







--
View this message in context: http://lucene.472066.n3.nabble.com/RSS-tutorial-that-comes-with-the-apache-solr-not-indexing-tp4033067p4033230.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: RSS tutorial that comes with the apache-solr not indexing

Posted by Lance Norskog <go...@gmail.com>.
This example may be out of date, if the RSS feeds from Slashdot have 
changed. If you know XML and XPaths, try this:
Find an rss feed from somewhere that works. Compare the xpaths in it 
v.s. the xpaths in the DIH script.

On 01/13/2013 07:38 PM, bibhor wrote:
> Hi
> I am trying to use the RSS tutorial that comes with the apache-solr.
> I am not sure if I missed anything but when I do full-import no indexing
> happens.
> These are the steps that I am taking:
>
> 1) Download apache-solr-3.6.2 (http://lucene.apache.org/solr/)
> 2) Start the solr by doing: java -Dsolr.solr.home="./example-DIH/solr/" -jar
> start.jar
> 3) Goto url:
> http://192.168.1.12:8983/solr/rss/dataimport?command=full-import
> 4) When I do this it says: Indexing completed. Added/Updated: 0 documents.
> Deleted 0 documents.
>
> Now I know that the default example is getting the RSS from:
> http://rss.slashdot.org/Slashdot/slashdot
> This default example is empty when I view it in chrome. It does have XML
> data in the source but I am not sure if this has anything to do with the
> import failure.
>   
> I also modified the rss-config so that I can test other RSS sources. I used
> http://www.feedforall.com/sample.xml and updated the rss-config.xml but this
> did the same and did not Add/Update any documents.
> Any help is appreciated.
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/RSS-tutorial-that-comes-with-the-apache-solr-not-indexing-tp4033067.html
> Sent from the Solr - User mailing list archive at Nabble.com.