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 Pritesh Patel <pr...@gmail.com> on 2013/12/13 20:32:39 UTC

Indexing RestFul Json Service

Does anybody know how to index Json Data coming from a RestFul service?  I
see I can use the DIH to index xml data, but what about Json?

--Pritesh

Re: Indexing RestFul Json Service

Posted by William Bell <bi...@gmail.com>.
There is a patch that we use in production that works great.

Name all the json fields ending in _json and String type.

wt=json&json.fsuffix=_json

And the json will not be escaped and work properly.



On Sun, Dec 15, 2013 at 10:42 AM, Alfredo Serafini <se...@gmail.com> wrote:

> Hi Pritesh
>
> other two options for indexing generic json could be at the moment:
> 1) implement a specific json datasource for Data import handler (this
> should not be so complex, and it will be useful for others)
> 2) use httpsource, then a line entityprocessor to acquire the full json
> text (if you don't read the data as a stream but as a whole this could give
> some problem transferring huge files), then split the json by javascript
> using a and update.js approach while indexing
>
>
>
> Alfredo
>
>
> 2013/12/13 Ahmet Arslan <io...@yahoo.com>
>
> > Hi,
> >
> > Solr accepts json. In the following form :
> >
> https://svn.apache.org/repos/asf/lucene/dev/trunk/solr/example/exampledocs/books.json
> >
> >
> >
> > On Friday, December 13, 2013 9:33 PM, Pritesh Patel <
> > priteshdevelopment@gmail.com> wrote:
> > Does anybody know how to index Json Data coming from a RestFul service?
>  I
> > see I can use the DIH to index xml data, but what about Json?
> >
> > --Pritesh
> >
> >
>



-- 
Bill Bell
billnbell@gmail.com
cell 720-256-8076

Re: Indexing RestFul Json Service

Posted by Alfredo Serafini <se...@gmail.com>.
Hi Pritesh

other two options for indexing generic json could be at the moment:
1) implement a specific json datasource for Data import handler (this
should not be so complex, and it will be useful for others)
2) use httpsource, then a line entityprocessor to acquire the full json
text (if you don't read the data as a stream but as a whole this could give
some problem transferring huge files), then split the json by javascript
using a and update.js approach while indexing



Alfredo


2013/12/13 Ahmet Arslan <io...@yahoo.com>

> Hi,
>
> Solr accepts json. In the following form :
> https://svn.apache.org/repos/asf/lucene/dev/trunk/solr/example/exampledocs/books.json
>
>
>
> On Friday, December 13, 2013 9:33 PM, Pritesh Patel <
> priteshdevelopment@gmail.com> wrote:
> Does anybody know how to index Json Data coming from a RestFul service?  I
> see I can use the DIH to index xml data, but what about Json?
>
> --Pritesh
>
>

Re: Indexing RestFul Json Service

Posted by Ahmet Arslan <io...@yahoo.com>.
Hi,

Solr accepts json. In the following form : https://svn.apache.org/repos/asf/lucene/dev/trunk/solr/example/exampledocs/books.json



On Friday, December 13, 2013 9:33 PM, Pritesh Patel <pr...@gmail.com> wrote:
Does anybody know how to index Json Data coming from a RestFul service?  I
see I can use the DIH to index xml data, but what about Json?

--Pritesh