Hello Prathib,

This is how I would go.  Will index these XML's as flat records/plain data
in Solr and then during query time search these records.  Converting xml's
to plain data in the form of key/ value pair will be done during ingestion
time and then during query if you have to present results into XML format,
you can again apply the XML transformation.

Basically search XML snippets is more or less a text search which is what
Solr is about.  You can utilise nested documents in Solr to fit your need.

Thanks,
Susheel

On Tue, Feb 14, 2017 at 7:39 PM, Prathib Kumar <[email protected]> wrote:

> Hi,
>
> We are evaluating solr to see if it can help to do a search of the xml
> snippets from the whole xml doc.
>
> For Ex:
> Document-1:
>
> <Book>
>    <author>Prathib</author>
>    <title>Java</title>
>    <city>san jose</city>
>     <state>CA</state>
> <Book>
>
> Document-2:
> <Book>
>    <author>Joe</author>
>    <title>C++</title>
>    <city>chennai</city>
>     <state>TN</state>
> <Book>
>
> Document-3:
> <Book>
>    <author>Ramu</author>
>    <title>Python</title>
>    <city>LosAngeles</city>
>     <state>CA</state>
> <Book>
>
>
> My Search string is another XML doc which could be like.
>
> Query-1:
> <Book>
>     <city> san jose</city>
> </Book>
>
> Query-2:
> <Book>
>    <state>CA</state>
> </Book>
>
> I have broken this down for simplicity, in reality our xmls are nested and
> have many attributes on each tag.
>
> To continue the evaluation of solr, can you please help me from where I
> could start the analysis ?
>
> Note : currently our xml document doesnt adhere to any schema but we could
> create a schema if required.
>
>
>
> Regards
> Prathib Kumar.
>
>

Reply via email to