Topics/Entities with relevancy scores and searching

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Topics/Entities with relevancy scores and searching

Scott Decker
Hey all,
  a question on possible search paths/structure.  If we have a text document, and we have run our magic over it and come away with Topics and Entities (Like, Barack Obama and Apple Inc.) and we have a relevancy score for each one, what would be the best way to store and query against them?

we currently are trying a parent/child relationship, where the children are the terms with their relevancy score and the scoring of the parent text document gets done from the relevancy scores of the children. That works. Just worried about speed of parent/child against millions of documents.

Another way we could think of was, build our own scorer/analyzer.  If we are reading in tokens like BarackObama.93345|AppleInc.0034
where it has the topic and the relevancy score to the document in it, i can build an analyzer to read those sorts of tokens, but is there any way to build a scorer that can use that token match data to score?

and third, is there any other way to normalize this data into one document so we can score on it. That seems like it would be the fastest way to query, but my #2 option here is the only way I can think of doing it.  Anyone else tagging their documents with relevancy scores to topics, on the document and then letting people search for those topics and pulling back the relevant docs based on the per document relevancy scores?

Thanks,
Scott

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/9434db79-363f-4470-bf91-b960908c2de6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Topics/Entities with relevancy scores and searching

Clinton Gormley-2


On 23 August 2014 15:04, Scott Decker <[hidden email]> wrote:
Hey all,
  a question on possible search paths/structure.  If we have a text document, and we have run our magic over it and come away with Topics and Entities (Like, Barack Obama and Apple Inc.) and we have a relevancy score for each one, what would be the best way to store and query against them?

we currently are trying a parent/child relationship, where the children are the terms with their relevancy score and the scoring of the parent text document gets done from the relevancy scores of the children. That works. Just worried about speed of parent/child against millions of documents.

Another way we could think of was, build our own scorer/analyzer.  If we are reading in tokens like BarackObama.93345|AppleInc.0034
where it has the topic and the relevancy score to the document in it, i can build an analyzer to read those sorts of tokens, but is there any way to build a scorer that can use that token match data to score?

and third, is there any other way to normalize this data into one document so we can score on it. That seems like it would be the fastest way to query, but my #2 option here is the only way I can think of doing it.  Anyone else tagging their documents with relevancy scores to topics, on the document and then letting people search for those topics and pulling back the relevant docs based on the per document relevancy scores?

Thanks,
Scott

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/9434db79-363f-4470-bf91-b960908c2de6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAPt3XKQmp%3D4Tjft6REtvWZ-2%3DmhqPqnnk-OXtK3oPqw4iNFJmw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Topics/Entities with relevancy scores and searching

Scott Decker
Interesting.
so, set a payload on the term, in this case the topic/entity, and the payload is the relevancy value. Then, you can do your function score on the query of the main documents themselves, no need for parent/child.

Have you done this? any concerns to performance with this sort of scoring, or, it is just as fast if you were doing base lucene scoring if we override the score function and just use our own?
-- we will of course try it and run our own performance tests, just looking to see if you all ready have any insights.

Super helpful!
Scott


On Saturday, August 23, 2014 7:50:18 AM UTC-7, Clinton Gormley wrote:
Have a look at:

* <a href="http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/analysis-delimited-payload-tokenfilter.html" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.elasticsearch.org%2Fguide%2Fen%2Felasticsearch%2Freference%2Fcurrent%2Fanalysis-delimited-payload-tokenfilter.html\46sa\75D\46sntz\0751\46usg\75AFQjCNHvlMolUErS8FpHcwl4eeTGuOn8AA';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.elasticsearch.org%2Fguide%2Fen%2Felasticsearch%2Freference%2Fcurrent%2Fanalysis-delimited-payload-tokenfilter.html\46sa\75D\46sntz\0751\46usg\75AFQjCNHvlMolUErS8FpHcwl4eeTGuOn8AA';return true;">http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/analysis-delimited-payload-tokenfilter.html
* <a href="http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-advanced-scripting.html" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.elasticsearch.org%2Fguide%2Fen%2Felasticsearch%2Freference%2Fcurrent%2Fmodules-advanced-scripting.html\46sa\75D\46sntz\0751\46usg\75AFQjCNFWDVKnLVtTZRfPza8osGm0So9Fng';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.elasticsearch.org%2Fguide%2Fen%2Felasticsearch%2Freference%2Fcurrent%2Fmodules-advanced-scripting.html\46sa\75D\46sntz\0751\46usg\75AFQjCNFWDVKnLVtTZRfPza8osGm0So9Fng';return true;">http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-advanced-scripting.html




On 23 August 2014 15:04, Scott Decker <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="Nxoe0Rufrd8J" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">sc...@...> wrote:
Hey all,
  a question on possible search paths/structure.  If we have a text document, and we have run our magic over it and come away with Topics and Entities (Like, Barack Obama and Apple Inc.) and we have a relevancy score for each one, what would be the best way to store and query against them?

we currently are trying a parent/child relationship, where the children are the terms with their relevancy score and the scoring of the parent text document gets done from the relevancy scores of the children. That works. Just worried about speed of parent/child against millions of documents.

Another way we could think of was, build our own scorer/analyzer.  If we are reading in tokens like BarackObama.93345|AppleInc.0034
where it has the topic and the relevancy score to the document in it, i can build an analyzer to read those sorts of tokens, but is there any way to build a scorer that can use that token match data to score?

and third, is there any other way to normalize this data into one document so we can score on it. That seems like it would be the fastest way to query, but my #2 option here is the only way I can think of doing it.  Anyone else tagging their documents with relevancy scores to topics, on the document and then letting people search for those topics and pulling back the relevant docs based on the per document relevancy scores?

Thanks,
Scott

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="Nxoe0Rufrd8J" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">elasticsearc...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/elasticsearch/9434db79-363f-4470-bf91-b960908c2de6%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" onmousedown="this.href='https://groups.google.com/d/msgid/elasticsearch/9434db79-363f-4470-bf91-b960908c2de6%40googlegroups.com?utm_medium\75email\46utm_source\75footer';return true;" onclick="this.href='https://groups.google.com/d/msgid/elasticsearch/9434db79-363f-4470-bf91-b960908c2de6%40googlegroups.com?utm_medium\75email\46utm_source\75footer';return true;">https://groups.google.com/d/msgid/elasticsearch/9434db79-363f-4470-bf91-b960908c2de6%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/b3dd847f-99dc-4bad-9a2c-da9b6337ed8c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Topics/Entities with relevancy scores and searching

Clinton Gormley-2

On 24 August 2014 19:46, Scott Decker <[hidden email]> wrote:
Have you done this? any concerns to performance with this sort of scoring, or, it is just as fast if you were doing base lucene scoring if we override the score function and just use our own?
-- we will of course try it and run our own performance tests, just looking to see if you all ready have any insights.

I haven't benchmarked it myself.  Obviously accessing payloads is slower than not, and some further work could be done on the scripting side to cache some term statistics lookups, but I don't know how performance will compare to doing this natively.

Would be interested in your feedback

clint

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAPt3XKQi%3DLMo83S6w-LZyrGz%3DD3gHPf0B1ZbU-EGkS6p9c9jPA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Topics/Entities with relevancy scores and searching

hespoddi
I'm curious: Using the delimited_payload_filter, how do you know which term in delimited list was hit by query in script? From the "text scoring in scripts" documentation, it seems you have to know the term:

_index['FIELD'].get('TERM', _PAYLOADS)

Is the matched term accessible in the script in some way?

On Monday, August 25, 2014 6:49:01 AM UTC-4, Clinton Gormley wrote:

On 24 August 2014 19:46, Scott Decker <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="4N1XD5NyseMJ" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">sc...@...> wrote:
Have you done this? any concerns to performance with this sort of scoring, or, it is just as fast if you were doing base lucene scoring if we override the score function and just use our own?
-- we will of course try it and run our own performance tests, just looking to see if you all ready have any insights.

I haven't benchmarked it myself.  Obviously accessing payloads is slower than not, and some further work could be done on the scripting side to cache some term statistics lookups, but I don't know how performance will compare to doing this natively.

Would be interested in your feedback

clint

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/ba060bc0-a9bc-4cfd-b0fd-29167022f249%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.