Scoring problem

Hi,

I will try to explain my problem:

I have a request "A B C" where A, B and C are 3 common words. this words
are present in a lot of documents.
The most important document for this request contain the 3 words one time
and they are adjacent.
The document has a bad score and I would like to boost it.

Any idea ? Is-it possible to apply a word distance boost ? Is it possible
to index "A B C" has one word ?

Thanks for your help

--

Hello!

Will phrase query help in your case ? You can configure slop, which gives you control over how distant the words can be from each other to consider them as a phrase. Wrapping that with a custom score would boost the documents you are interested in.

--

Regards,

Rafał Kuć

Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch - ElasticSearch

Hi,

I will try to explain my problem:

I have a request "A B C" where A, B and C are 3 common words. this words are present in a lot of documents.

The most important document for this request contain the 3 words one time and they are adjacent.

The document has a bad score and I would like to boost it.

Any idea ? Is-it possible to apply a word distance boost ? Is it possible to index "A B C" has one word ?

Thanks for your help

--

Ok, so now i have 2 queries :

1- Using "Query phrase" :

"query": {
"match": {
"_all" : {
"query" : "$KW",
"type" : "phrase",
"slop" : "1"
}
}
}

On Friday, December 21, 2012 3:51:59 PM UTC+1, Rafał Kuć wrote:

Hello!

Will phrase query help in your case ? You can configure slop, which gives
you control over how distant the words can be from each other to consider
them as a phrase. Wrapping that with a custom score would boost the
documents you are interested in.
*--
Regards,
Rafał Kuć
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch -
Elasticsearch

Hi,

I will try to explain my problem:

I have a request "A B C" where A, B and C are 3 common words. this words
are present in a lot of documents.
The most important document for this request contain the 3 words one time
and they are adjacent.
The document has a bad score and I would like to boost it.

Any idea ? Is-it possible to apply a word distance boost ? Is it possible
to index "A B C" has one word ?

Thanks for your help

--

Ok, so now i have 2 queries :

1- Using "Query phrase" :

"query": {
"match": {
"_all" : {
"query" : "test",
"type" : "phrase",
"slop" : "1"
}
}
}

1- using Query string

"query": {
"query_string" : {
"fields" : ["faq_titre","faq_contenu", "forcage"],
"query": "test"
}
}

Now I want to combine the queries. If I understand your answer I should use
the custom score but I am not sure to understand how it works.

On Friday, December 21, 2012 3:51:59 PM UTC+1, Rafał Kuć wrote:

Hello!

Will phrase query help in your case ? You can configure slop, which gives
you control over how distant the words can be from each other to consider
them as a phrase. Wrapping that with a custom score would boost the
documents you are interested in.
*--
Regards,
Rafał Kuć
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch -
Elasticsearch

Hi,

I will try to explain my problem:

I have a request "A B C" where A, B and C are 3 common words. this words
are present in a lot of documents.
The most important document for this request contain the 3 words one time
and they are adjacent.
The document has a bad score and I would like to boost it.

Any idea ? Is-it possible to apply a word distance boost ? Is it possible
to index "A B C" has one word ?

Thanks for your help

--

You can wrap the two queries in a bool query and optionally supply a query
time boost to each clause:

On 24 December 2012 10:04, Pascal Dorini pdorini@gmail.com wrote:

Ok, so now i have 2 queries :

1- Using "Query phrase" :

"query": {
** "match": {
"_all" : {
"query" : "test",

      "type\" : "phrase",
      "slop" : "1"
    }
  }
}

1- using Query string

"query": {
"query_string" : {
"fields" : ["faq_titre","faq_contenu", "forcage"],
"query": "test"
}
}

Now I want to combine the queries. If I understand your answer I should
use the custom score but I am not sure to understand how it works.

On Friday, December 21, 2012 3:51:59 PM UTC+1, Rafał Kuć wrote:

Hello!

Will phrase query help in your case ? You can configure slop, which gives
you control over how distant the words can be from each other to consider
them as a phrase. Wrapping that with a custom score would boost the
documents you are interested in.
*--
Regards,
Rafał Kuć
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch -
Elasticsearch

Hi,

I will try to explain my problem:

I have a request "A B C" where A, B and C are 3 common words. this words
are present in a lot of documents.
The most important document for this request contain the 3 words one
time and they are adjacent.
The document has a bad score and I would like to boost it.

Any idea ? Is-it possible to apply a word distance boost ? Is it possible
to index "A B C" has one word ?

Thanks for your help

--

--
Met vriendelijke groet,

Martijn van Groningen

--

It works, thanks for your help.

On Monday, December 24, 2012 4:06:08 PM UTC+1, Martijn v Groningen wrote:

You can wrap the two queries in a bool query and optionally supply a query
time boost to each clause:
Elasticsearch Platform — Find real-time answers at scale | Elastic

On 24 December 2012 10:04, Pascal Dorini <pdo...@gmail.com <javascript:>>wrote:

Ok, so now i have 2 queries :

1- Using "Query phrase" :

"query": {
** "match": {
"_all" : {
"query" : "test",

      "type\" : "phrase",
      "slop" : "1"
    }
  }
}

1- using Query string

"query": {
"query_string" : {
"fields" : ["faq_titre","faq_contenu", "forcage"],
"query": "test"
}
}

Now I want to combine the queries. If I understand your answer I should
use the custom score but I am not sure to understand how it works.

On Friday, December 21, 2012 3:51:59 PM UTC+1, Rafał Kuć wrote:

Hello!

Will phrase query help in your case ? You can configure slop, which
gives you control over how distant the words can be from each other to
consider them as a phrase. Wrapping that with a custom score would boost
the documents you are interested in.
*--
Regards,
Rafał Kuć
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch -
Elasticsearch

Hi,

I will try to explain my problem:

I have a request "A B C" where A, B and C are 3 common words. this words
are present in a lot of documents.
The most important document for this request contain the 3 words one
time and they are adjacent.
The document has a bad score and I would like to boost it.

Any idea ? Is-it possible to apply a word distance boost ? Is it
possible to index "A B C" has one word ?

Thanks for your help

--

--
Met vriendelijke groet,

Martijn van Groningen

--