# Newbie question about relevance

**URL:** <https://discuss.elastic.co/t/newbie-question-about-relevance/11501>\
**Category:** Elasticsearch\
**Created:** [April 9, 2013, 10:49am UTC](https://discuss.elastic.co/t/newbie-question-about-relevance/11501 "2013-04-09T10:49:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steffen\_Larsen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffen_larsen/32/2400_2.png) [@Steffen\_Larsen](https://discuss.elastic.co/u/Steffen_Larsen)\
**Post date:** [April 9, 2013, 10:49am UTC](https://discuss.elastic.co/t/newbie-question-about-relevance/11501/1 "2013-04-09T10:49:46Z")

</div>

Hi,

I'm quite new in this area of elastic search, lucene etc.  
So I have quite a basic question.

How do I compare multiple document and see their relevance in the different  
field.

E.g. I have two documents, containing different fields: name, company,  
phone etc. I want to see how "much" they compare. For example they might be  
comparable 80%, because only a couple of fields differs.  
How do I query such a search?

PS: I am using couchbase, but I am replicating my data to Elasticseach for  
making specific search and now I want this comparison.

-Cheers!

/Steffen

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![marian](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marian/32/442_2.png) [@marian](https://discuss.elastic.co/u/marian)\
**Post date:** [April 9, 2013, 2:19pm UTC](https://discuss.elastic.co/t/newbie-question-about-relevance/11501/2 "2013-04-09T14:19:45Z")

</div>

You might be looking for "MoreLikeThis" queries. This allows you to find  
similar documents, with one specific document as the starting point.

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

If that's not what you meant, please give a little more detail what you are  
trying to accomplish.

Marian

Am Dienstag, 9. April 2013 12:49:46 UTC+2 schrieb Steffen Larsen:

> Hi,
> 
> I'm quite new in this area of Elasticsearch, lucene etc.  
> So I have quite a basic question.
> 
> How do I compare multiple document and see their relevance in the  
> different field.
> 
> E.g. I have two documents, containing different fields: name, company,  
> phone etc. I want to see how "much" they compare. For example they might be  
> comparable 80%, because only a couple of fields differs.  
> How do I query such a search?
> 
> PS: I am using couchbase, but I am replicating my data to Elasticseach for  
> making specific search and now I want this comparison.
> 
> -Cheers!
> 
> /Steffen

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [April 9, 2013, 2:21pm UTC](https://discuss.elastic.co/t/newbie-question-about-relevance/11501/3 "2013-04-09T14:21:52Z")

</div>

Lucene provides an "explanation" for each document regarding how/why they  
match a query:

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

The output can be difficult to read if your queries are elaborate. The  
explain object will not compare two documents relative to each other, just  
to the query. Elasticsearch also exposes an Explain API which executes a  
query only on a specific document:

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

--  
Ivan

On Tue, Apr 9, 2013 at 3:49 AM, Steffen Larsen [zooldk@gmail.com](mailto:zooldk@gmail.com) wrote:

> Hi,
> 
> I'm quite new in this area of Elasticsearch, lucene etc.  
> So I have quite a basic question.
> 
> How do I compare multiple document and see their relevance in the  
> different field.
> 
> E.g. I have two documents, containing different fields: name, company,  
> phone etc. I want to see how "much" they compare. For example they might be  
> comparable 80%, because only a couple of fields differs.  
> How do I query such a search?
> 
> PS: I am using couchbase, but I am replicating my data to Elasticseach for  
> making specific search and now I want this comparison.
> 
> -Cheers!
> 
> /Steffen
> 
> --  
> 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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Steffen\_Larsen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffen_larsen/32/2400_2.png) [@Steffen\_Larsen](https://discuss.elastic.co/u/Steffen_Larsen)\
**Post date:** [April 10, 2013, 12:30pm UTC](https://discuss.elastic.co/t/newbie-question-about-relevance/11501/4 "2013-04-10T12:30:06Z")

</div>

Hi,

Thanks for the answers. I'll have a look at the explain and 'more-like-this' doc. Seems promising.

-Cheers"  
/Steffen

On Apr 9, 2013, at 4:21 PM, Ivan Brusic [ivan@brusic.com](mailto:ivan@brusic.com) wrote:

> Lucene provides an "explanation" for each document regarding how/why they match a query: [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/search/explain/)
> 
> The output can be difficult to read if your queries are elaborate. The explain object will not compare two documents relative to each other, just to the query. Elasticsearch also exposes an Explain API which executes a query only on a specific document: [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/explain/)
> 
> --  
> Ivan
> 
> On Tue, Apr 9, 2013 at 3:49 AM, Steffen Larsen [zooldk@gmail.com](mailto:zooldk@gmail.com) wrote:  
> Hi,
> 
> I'm quite new in this area of Elasticsearch, lucene etc.  
> So I have quite a basic question.
> 
> How do I compare multiple document and see their relevance in the different field.
> 
> E.g. I have two documents, containing different fields: name, company, phone etc. I want to see how "much" they compare. For example they might be comparable 80%, because only a couple of fields differs.  
> How do I query such a search?
> 
> PS: I am using couchbase, but I am replicating my data to Elasticseach for making specific search and now I want this comparison.
> 
> -Cheers!
> 
> /Steffen
> 
> --  
> 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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> You received this message because you are subscribed to a topic in the Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit [https://groups.google.com/d/topic/elasticsearch/oKknEce4rcI/unsubscribe?hl=en-US](https://groups.google.com/d/topic/elasticsearch/oKknEce4rcI/unsubscribe?hl=en-US).  
> To unsubscribe from this group and all its topics, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:41am UTC](https://discuss.elastic.co/t/newbie-question-about-relevance/11501/5 "2017-07-06T02:41:49Z")

</div>


