Search if the indexed data is present in the query or not

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Search if the indexed data is present in the query or not

Nithin Sreekumar
My query is a message which can be of any length. For example "A quick
brown lazy fox jump over the well and ran to the jungle" is my query to
check. I have some indexed data. The indexed data contains strings which is
present as well as not in the message.
For example :- {'lazy','jump',etc}
Obviously, we can check for the query string in the indexed data. But what
I need is if I search with that long message and if any part of the message
is present in the indexed data, then it must highlight the part of the
message where the string is found.
Example :-

q: "A quick brown lazy fox jump over the well and ran to the jungle"
If indexed data has a term 'lazy' and no other keywords which is present in
the string, then if I search for the query then it must return the result
with the term in the query 'lazy' as highlighted. If more terms are present
in the indexed data, then they must also be highlighted.

Thanks & Regards,

NITHIN B SREEKUMAR
Reply | Threaded
Open this post in threaded view
|

Re: Search if the indexed data is present in the query or not

Susheel Kumar-3
I am not able to follow what's the use case/ask is, but you already have
the query.  You can search/highlight whatever you want to do with the query
string. Remember you search a single query against multiple (hundreds of
documents)

On Tue, Sep 12, 2017 at 1:31 AM, Nithin Sreekumar <[hidden email]>
wrote:

> My query is a message which can be of any length. For example "A quick
> brown lazy fox jump over the well and ran to the jungle" is my query to
> check. I have some indexed data. The indexed data contains strings which is
> present as well as not in the message.
> For example :- {'lazy','jump',etc}
> Obviously, we can check for the query string in the indexed data. But what
> I need is if I search with that long message and if any part of the message
> is present in the indexed data, then it must highlight the part of the
> message where the string is found.
> Example :-
>
> q: "A quick brown lazy fox jump over the well and ran to the jungle"
> If indexed data has a term 'lazy' and no other keywords which is present in
> the string, then if I search for the query then it must return the result
> with the term in the query 'lazy' as highlighted. If more terms are present
> in the indexed data, then they must also be highlighted.
>
> Thanks & Regards,
>
> NITHIN B SREEKUMAR
>