Which query is the best for standard searching?

I'm using ElasticSearch as a database for long text's to search their
content. Which query with what parameters will be the best for
standard text searching, the google kind of search etc. so I'm
entering a string, phrase whatever the user can try to look for and
finding best results with some similarity rule

query_string.

what configuration should I use for best performance of searching?

On 23 Cze, 11:07, Nick Dunn n...@nick-dunn.co.uk wrote:

query_string.

anyone? I'm looking for best configuration of query_string for
searching results?

Hello!

Its hard to give a general query that will work in all situations, I
don't think it's even possible. You should think what fields in your
index are important to you (and use boosting on those), you should
think if you want phrase queries to be used to boost documents that
have them present. You may also want to have some fields boost score
of your documents (for example number of likes or recent date) so you
may want to use custom score query. And many, many more 'You may'.

You should think what you want Elasticsearch to return and how and
this way construct your queries.

--
Regards,
Rafał Kuć
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch - Elasticsearch

anyone? I'm looking for best configuration of query_string for
searching results?

Heh yeah I know that it's kind of problem with answers like "you can
or you can or you can" and it all depends on what you need... problem
is that it's hard to start using this search engine because of lack of
documentation tuts etc

I would like to use it only in one case I'm searching the documents
using only one field always and I want to build the most standard
search engine for frazes that will return results from best similarity
to lower and so on...

so if I have a fraze like "AAA BBB CCC" search results will be like:

AAA BBB CCC

AAX BBB CCC

AAA BBB

AAX BBB

AAA

AAX

On 29 Cze, 13:28, Rafał Kuć r....@solr.pl wrote:

Hello!

Its hard to give a general query that will work in all situations, I
don't think it's even possible. You should think what fields in your
index are important to you (and use boosting on those), you should
think if you want phrase queries to be used to boost documents that
have them present. You may also want to have some fields boost score
of your documents (for example number of likes or recent date) so you
may want to use custom score query. And many, many more 'You may'.

You should think what you want Elasticsearch to return and how and
this way construct your queries.

--
Regards,
Rafa³ Kuæ
Sematext ::http://sematext.com/:: Solr - Lucene - Nutch - Elasticsearch

anyone? I'm looking for best configuration of query_string for
searching results?

Hello!

Use boolean query with OR to get all documents with at least one term,
than use phrase query to boost the documents that have the words close
to each other (look at the phrase sloop to see how you control that)
and finally use boosting query to boost the documents that have all
the terms in the field you are searching on. Of course all of that
should be combined into a single query for Elasticsearch to do all the
score calculation for you.

I don't know what you want to achieve when you say you want to have
results of 'AAX' when querying for 'AAA'.

--
Regards,
Rafał Kuć
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch - Elasticsearch

Heh yeah I know that it's kind of problem with answers like "you can
or you can or you can" and it all depends on what you need... problem
is that it's hard to start using this search engine because of lack of
documentation tuts etc

I would like to use it only in one case I'm searching the documents
using only one field always and I want to build the most standard
search engine for frazes that will return results from best similarity
to lower and so on...

so if I have a fraze like "AAA BBB CCC" search results will be like:

AAA BBB CCC

AAX BBB CCC

AAA BBB

AAX BBB

AAA

AAX

On 29 Cze, 13:28, Rafał Kuć r....@solr.pl wrote:

Hello!

Its hard to give a general query that will work in all situations, I
don't think it's even possible. You should think what fields in your
index are important to you (and use boosting on those), you should
think if you want phrase queries to be used to boost documents that
have them present. You may also want to have some fields boost score
of your documents (for example number of likes or recent date) so you
may want to use custom score query. And many, many more 'You may'.

You should think what you want Elasticsearch to return and how and
this way construct your queries.

--
Regards,
Rafa³ Kuæ
Sematext ::http://sematext.com/:: Solr - Lucene - Nutch - Elasticsearch

anyone? I'm looking for best configuration of query_string for
searching results?

AAX -> AAA I meant similarity so when I will write CAT I will always
fins CATS etc.

On 29 Cze, 14:07, Rafał Kuć r....@solr.pl wrote:

Hello!

Use boolean query with OR to get all documents with at least one term,
than use phrase query to boost the documents that have the words close
to each other (look at the phrase sloop to see how you control that)
and finally use boosting query to boost the documents that have all
the terms in the field you are searching on. Of course all of that
should be combined into a single query for Elasticsearch to do all the
score calculation for you.

I don't know what you want to achieve when you say you want to have
results of 'AAX' when querying for 'AAA'.

--
Regards,
Rafał Kuć
Sematext ::http://sematext.com/:: Solr - Lucene - Nutch - Elasticsearch

Heh yeah I know that it's kind of problem with answers like "you can
or you can or you can" and it all depends on what you need... problem
is that it's hard to start using this search engine because of lack of
documentation tuts etc
I would like to use it only in one case I'm searching the documents
using only one field always and I want to build the most standard
search engine for frazes that will return results from best similarity
to lower and so on...
so if I have a fraze like "AAA BBB CCC" search results will be like:
AAA BBB CCC
AAX BBB CCC
AAA BBB
AAX BBB
AAA
AAX
On 29 Cze, 13:28, Rafał Kuć r....@solr.pl wrote:

Hello!

Its hard to give a general query that will work in all situations, I
don't think it's even possible. You should think what fields in your
index are important to you (and use boosting on those), you should
think if you want phrase queries to be used to boost documents that
have them present. You may also want to have some fields boost score
of your documents (for example number of likes or recent date) so you
may want to use custom score query. And many, many more 'You may'.

You should think what you want Elasticsearch to return and how and
this way construct your queries.

--
Regards,
Rafa³ Kuæ
Sematext ::http://sematext.com/::Solr - Lucene - Nutch - Elasticsearch

anyone? I'm looking for best configuration of query_string for
searching results?

Hello!

You mean that when you type in plural form, you also find singular and
all the cases like buy, bought should be find when typing buy ? Then
you also should look at analysis, because its a matter of the correct
language analysis:

.

--
Regards,
Rafał Kuć
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch - Elasticsearch

AAX ->> AAA I meant similarity so when I will write CAT I will always

fins CATS etc.

On 29 Cze, 14:07, Rafał Kuć r....@solr.pl wrote:

Hello!

Use boolean query with OR to get all documents with at least one term,
than use phrase query to boost the documents that have the words close
to each other (look at the phrase sloop to see how you control that)
and finally use boosting query to boost the documents that have all
the terms in the field you are searching on. Of course all of that
should be combined into a single query for Elasticsearch to do all the
score calculation for you.

I don't know what you want to achieve when you say you want to have
results of 'AAX' when querying for 'AAA'.

--
Regards,
Rafał Kuć
Sematext ::http://sematext.com/:: Solr - Lucene - Nutch - Elasticsearch

Heh yeah I know that it's kind of problem with answers like "you can
or you can or you can" and it all depends on what you need... problem
is that it's hard to start using this search engine because of lack of
documentation tuts etc
I would like to use it only in one case I'm searching the documents
using only one field always and I want to build the most standard
search engine for frazes that will return results from best similarity
to lower and so on...
so if I have a fraze like "AAA BBB CCC" search results will be like:
AAA BBB CCC
AAX BBB CCC
AAA BBB
AAX BBB
AAA
AAX
On 29 Cze, 13:28, Rafał Kuć r....@solr.pl wrote:

Hello!

Its hard to give a general query that will work in all situations, I
don't think it's even possible. You should think what fields in your
index are important to you (and use boosting on those), you should
think if you want phrase queries to be used to boost documents that
have them present. You may also want to have some fields boost score
of your documents (for example number of likes or recent date) so you
may want to use custom score query. And many, many more 'You may'.

You should think what you want Elasticsearch to return and how and
this way construct your queries.

--
Regards,
Rafa³ Kuæ
Sematext ::http://sematext.com/::Solr - Lucene - Nutch - Elasticsearch

anyone? I'm looking for best configuration of query_string for
searching results?

Something like this, mayby not so much like finding bought when typing
buy, but I'm searching in our beautifull Polish language :slight_smile: so when I
will tyle "szkolenie" I would also want to find "szkoleń",
"szkoleniowy", "szkolenia" and so on...

On 29 Cze, 14:21, Rafał Kuć r....@solr.pl wrote:

Hello!

You mean that when you type in plural form, you also find singular and
all the cases like buy, bought should be find when typing buy ? Then
you also should look at analysis, because its a matter of the correct
language analysis:Elasticsearch Platform — Find real-time answers at scale | Elastic...
.

--
Regards,
Rafał Kuć
Sematext ::http://sematext.com/:: Solr - Lucene - Nutch - Elasticsearch

AAX ->> AAA I meant similarity so when I will write CAT I will always

fins CATS etc.
On 29 Cze, 14:07, Rafał Kuć r....@solr.pl wrote:

Hello!

Use boolean query with OR to get all documents with at least one term,
than use phrase query to boost the documents that have the words close
to each other (look at the phrase sloop to see how you control that)
and finally use boosting query to boost the documents that have all
the terms in the field you are searching on. Of course all of that
should be combined into a single query for Elasticsearch to do all the
score calculation for you.

I don't know what you want to achieve when you say you want to have
results of 'AAX' when querying for 'AAA'.

--
Regards,
Rafał Kuć
Sematext ::http://sematext.com/::Solr - Lucene - Nutch - Elasticsearch

Heh yeah I know that it's kind of problem with answers like "you can
or you can or you can" and it all depends on what you need... problem
is that it's hard to start using this search engine because of lack of
documentation tuts etc
I would like to use it only in one case I'm searching the documents
using only one field always and I want to build the most standard
search engine for frazes that will return results from best similarity
to lower and so on...
so if I have a fraze like "AAA BBB CCC" search results will be like:
AAA BBB CCC
AAX BBB CCC
AAA BBB
AAX BBB
AAA
AAX
On 29 Cze, 13:28, Rafał Kuć r....@solr.pl wrote:

Hello!

Its hard to give a general query that will work in all situations, I
don't think it's even possible. You should think what fields in your
index are important to you (and use boosting on those), you should
think if you want phrase queries to be used to boost documents that
have them present. You may also want to have some fields boost score
of your documents (for example number of likes or recent date) so you
may want to use custom score query. And many, many more 'You may'.

You should think what you want Elasticsearch to return and how and
this way construct your queries.

--
Regards,
Rafa³ Kuæ
Sematext ::http://sematext.com/::Solr- Lucene - Nutch - Elasticsearch

anyone? I'm looking for best configuration of query_string for
searching results?

Hello!

There are two plugins for Polish for Elasticsearch. One can be found
here:

and the second one is here:

The first one is from Elasticsearch team and uses Stempel library for
handling Polish. The second one uses Morfologik analyzer, which is
better in terms of the number of words properly handled (at least from
my experience).

If you want to see some comparison on how those libraries work, take a
look at Solr 4.0 i możliwości analizy języka polskiego – Solr.pl
Its not based on Elasticsearch, but on Solr, but you will be able to
see how those libraries compare to each other.

--
Regards,
Rafał Kuć
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch - Elasticsearch

Something like this, mayby not so much like finding bought when typing
buy, but I'm searching in our beautifull Polish language :slight_smile: so when I
will tyle "szkolenie" I would also want to find "szkoleń",
"szkoleniowy", "szkolenia" and so on...

On 29 Cze, 14:21, Rafał Kuć r....@solr.pl wrote:

Hello!

You mean that when you type in plural form, you also find singular and
all the cases like buy, bought should be find when typing buy ? Then
you also should look at analysis, because its a matter of the correct
language analysis:Elasticsearch Platform — Find real-time answers at scale | Elastic...
.

--
Regards,
Rafał Kuć
Sematext ::http://sematext.com/:: Solr - Lucene - Nutch - Elasticsearch

AAX ->> AAA I meant similarity so when I will write CAT I will always

fins CATS etc.
On 29 Cze, 14:07, Rafał Kuć r....@solr.pl wrote:

Hello!

Use boolean query with OR to get all documents with at least one term,
than use phrase query to boost the documents that have the words close
to each other (look at the phrase sloop to see how you control that)
and finally use boosting query to boost the documents that have all
the terms in the field you are searching on. Of course all of that
should be combined into a single query for Elasticsearch to do all the
score calculation for you.

I don't know what you want to achieve when you say you want to have
results of 'AAX' when querying for 'AAA'.

--
Regards,
Rafał Kuć
Sematext ::http://sematext.com/::Solr - Lucene - Nutch - Elasticsearch

Heh yeah I know that it's kind of problem with answers like "you can
or you can or you can" and it all depends on what you need... problem
is that it's hard to start using this search engine because of lack of
documentation tuts etc
I would like to use it only in one case I'm searching the documents
using only one field always and I want to build the most standard
search engine for frazes that will return results from best similarity
to lower and so on...
so if I have a fraze like "AAA BBB CCC" search results will be like:
AAA BBB CCC
AAX BBB CCC
AAA BBB
AAX BBB
AAA
AAX
On 29 Cze, 13:28, Rafał Kuć r....@solr.pl wrote:

Hello!

Its hard to give a general query that will work in all situations, I
don't think it's even possible. You should think what fields in your
index are important to you (and use boosting on those), you should
think if you want phrase queries to be used to boost documents that
have them present. You may also want to have some fields boost score
of your documents (for example number of likes or recent date) so you
may want to use custom score query. And many, many more 'You may'.

You should think what you want Elasticsearch to return and how and
this way construct your queries.

--
Regards,
Rafa³ Kuæ
Sematext ::http://sematext.com/::Solr- Lucene - Nutch - Elasticsearch

anyone? I'm looking for best configuration of query_string for
searching results?

Seems a lot of work to create such query, I thought it will be much
easier, as they say Elasticsearch is so ready to use...

On 29 Cze, 14:36, Rafał Kuć r....@solr.pl wrote:

Hello!

There are two plugins for Polish for Elasticsearch. One can be found
here:

GitHub - elastic/elasticsearch-analysis-stempel: Stempel (Polish) Analysis Plugin for Elasticsearch

and the second one is here:

GitHub - monterail/elasticsearch-analysis-morfologik: Morfologik (Polish) Analysis Plugin for ElasticSearch

The first one is from Elasticsearch team and uses Stempel library for
handling Polish. The second one uses Morfologik analyzer, which is
better in terms of the number of words properly handled (at least from
my experience).

If you want to see some comparison on how those libraries work, take a
look athttp://solr.pl/2012/04/02/solr-4-0-i-mozliwosci-analizy-jezyka-polski...
Its not based on Elasticsearch, but on Solr, but you will be able to
see how those libraries compare to each other.

--
Regards,
Rafał Kuć
Sematext ::http://sematext.com/:: Solr - Lucene - Nutch - Elasticsearch

Something like this, mayby not so much like finding bought when typing
buy, but I'm searching in our beautifull Polish language :slight_smile: so when I
will tyle "szkolenie" I would also want to find "szkoleń",
"szkoleniowy", "szkolenia" and so on...
On 29 Cze, 14:21, Rafał Kuć r....@solr.pl wrote:

Hello!

You mean that when you type in plural form, you also find singular and
all the cases like buy, bought should be find when typing buy ? Then
you also should look at analysis, because its a matter of the correct
language analysis:Elasticsearch Platform — Find real-time answers at scale | Elastic...
.

--
Regards,
Rafał Kuć
Sematext ::http://sematext.com/::Solr - Lucene - Nutch - Elasticsearch

AAX ->> AAA I meant similarity so when I will write CAT I will always

fins CATS etc.
On 29 Cze, 14:07, Rafał Kuć r....@solr.pl wrote:

Hello!

Use boolean query with OR to get all documents with at least one term,
than use phrase query to boost the documents that have the words close
to each other (look at the phrase sloop to see how you control that)
and finally use boosting query to boost the documents that have all
the terms in the field you are searching on. Of course all of that
should be combined into a single query for Elasticsearch to do all the
score calculation for you.

I don't know what you want to achieve when you say you want to have
results of 'AAX' when querying for 'AAA'.

--
Regards,
Rafał Kuć
Sematext ::http://sematext.com/::Solr- Lucene - Nutch - Elasticsearch

Heh yeah I know that it's kind of problem with answers like "you can
or you can or you can" and it all depends on what you need... problem
is that it's hard to start using this search engine because of lack of
documentation tuts etc
I would like to use it only in one case I'm searching the documents
using only one field always and I want to build the most standard
search engine for frazes that will return results from best similarity
to lower and so on...
so if I have a fraze like "AAA BBB CCC" search results will be like:
AAA BBB CCC
AAX BBB CCC
AAA BBB
AAX BBB
AAA
AAX
On 29 Cze, 13:28, Rafał Kuć r....@solr.pl wrote:

Hello!

Its hard to give a general query that will work in all situations, I
don't think it's even possible. You should think what fields in your
index are important to you (and use boosting on those), you should
think if you want phrase queries to be used to boost documents that
have them present. You may also want to have some fields boost score
of your documents (for example number of likes or recent date) so you
may want to use custom score query. And many, many more 'You may'.

You should think what you want Elasticsearch to return and how and
this way construct your queries.

--
Regards,
Rafa³ Kuæ
Sematext ::http://sematext.com/::Solr-Lucene - Nutch - Elasticsearch

anyone? I'm looking for best configuration of query_string for
searching results?

Hello!

Elasticsearch is "so ready to use", you just have to tell
Elasticsearch what you want it to return and how :slight_smile:

--
Regards,
Rafał Kuć
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch - Elasticsearch

Seems a lot of work to create such query, I thought it will be much
easier, as they say Elasticsearch is so ready to use...

On 29 Cze, 14:36, Rafał Kuć r....@solr.pl wrote:

Hello!

There are two plugins for Polish for Elasticsearch. One can be found
here:

GitHub - elastic/elasticsearch-analysis-stempel: Stempel (Polish) Analysis Plugin for Elasticsearch

and the second one is here:

GitHub - monterail/elasticsearch-analysis-morfologik: Morfologik (Polish) Analysis Plugin for ElasticSearch

The first one is from Elasticsearch team and uses Stempel library for
handling Polish. The second one uses Morfologik analyzer, which is
better in terms of the number of words properly handled (at least from
my experience).

If you want to see some comparison on how those libraries work, take a
look athttp://solr.pl/2012/04/02/solr-4-0-i-mozliwosci-analizy-jezyka-polski...
Its not based on Elasticsearch, but on Solr, but you will be able to
see how those libraries compare to each other.

--
Regards,
Rafał Kuć
Sematext ::http://sematext.com/:: Solr - Lucene - Nutch - Elasticsearch

Something like this, mayby not so much like finding bought when typing
buy, but I'm searching in our beautifull Polish language :slight_smile: so when I
will tyle "szkolenie" I would also want to find "szkoleń",
"szkoleniowy", "szkolenia" and so on...
On 29 Cze, 14:21, Rafał Kuć r....@solr.pl wrote:

Hello!

You mean that when you type in plural form, you also find singular and
all the cases like buy, bought should be find when typing buy ? Then
you also should look at analysis, because its a matter of the correct
language analysis:Elasticsearch Platform — Find real-time answers at scale | Elastic...
.

--
Regards,
Rafał Kuć
Sematext ::http://sematext.com/::Solr - Lucene - Nutch - Elasticsearch

AAX ->> AAA I meant similarity so when I will write CAT I will always

fins CATS etc.
On 29 Cze, 14:07, Rafał Kuć r....@solr.pl wrote:

Hello!

Use boolean query with OR to get all documents with at least one term,
than use phrase query to boost the documents that have the words close
to each other (look at the phrase sloop to see how you control that)
and finally use boosting query to boost the documents that have all
the terms in the field you are searching on. Of course all of that
should be combined into a single query for Elasticsearch to do all the
score calculation for you.

I don't know what you want to achieve when you say you want to have
results of 'AAX' when querying for 'AAA'.

--
Regards,
Rafał Kuć
Sematext ::http://sematext.com/::Solr- Lucene - Nutch - Elasticsearch

Heh yeah I know that it's kind of problem with answers like "you can
or you can or you can" and it all depends on what you need... problem
is that it's hard to start using this search engine because of lack of
documentation tuts etc
I would like to use it only in one case I'm searching the documents
using only one field always and I want to build the most standard
search engine for frazes that will return results from best similarity
to lower and so on...
so if I have a fraze like "AAA BBB CCC" search results will be like:
AAA BBB CCC
AAX BBB CCC
AAA BBB
AAX BBB
AAA
AAX
On 29 Cze, 13:28, Rafał Kuć r....@solr.pl wrote:

Hello!

Its hard to give a general query that will work in all situations, I
don't think it's even possible. You should think what fields in your
index are important to you (and use boosting on those), you should
think if you want phrase queries to be used to boost documents that
have them present. You may also want to have some fields boost score
of your documents (for example number of likes or recent date) so you
may want to use custom score query. And many, many more 'You may'.

You should think what you want Elasticsearch to return and how and
this way construct your queries.

--
Regards,
Rafa³ Kuæ
Sematext ::http://sematext.com/::Solr-Lucene - Nutch - Elasticsearch

anyone? I'm looking for best configuration of query_string for
searching results?

Yes, but as I think this kind of searching I would like to implement into
my app is the most popular one than anyone could ever want to use and there
is no predefined query for that in ES, for people that start they adventure
with ES it is hard to build such comlicated query as the one I need to
build following your description, couldn't that be done by elastic
itself?...

W dniu poniedziałek, 2 lipca 2012 09:22:16 UTC+2 użytkownik Rafał Kuć
napisał:

Hello!

Elasticsearch is "so ready to use", you just have to tell
Elasticsearch what you want it to return and how :slight_smile:

--
Regards,
Rafał Kuć
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch -
Elasticsearch

Seems a lot of work to create such query, I thought it will be much
easier, as they say Elasticsearch is so ready to use...

On 29 Cze, 14:36, Rafał Kuć r....@solr.pl wrote:

Hello!

There are two plugins for Polish for Elasticsearch. One can be found
here:

GitHub - elastic/elasticsearch-analysis-stempel: Stempel (Polish) Analysis Plugin for Elasticsearch

and the second one is here:

GitHub - monterail/elasticsearch-analysis-morfologik: Morfologik (Polish) Analysis Plugin for ElasticSearch

The first one is from Elasticsearch team and uses Stempel library for
handling Polish. The second one uses Morfologik analyzer, which is
better in terms of the number of words properly handled (at least from
my experience).

If you want to see some comparison on how those libraries work, take a
look athttp://
solr.pl/2012/04/02/solr-4-0-i-mozliwosci-analizy-jezyka-polski...
Its not based on Elasticsearch, but on Solr, but you will be able to
see how those libraries compare to each other.

--
Regards,
Rafał Kuć
Sematext ::http://sematext.com/:: Solr - Lucene - Nutch -
Elasticsearch

Something like this, mayby not so much like finding bought when
typing
buy, but I'm searching in our beautifull Polish language :slight_smile: so when I
will tyle "szkolenie" I would also want to find "szkoleń",
"szkoleniowy", "szkolenia" and so on...
On 29 Cze, 14:21, Rafał Kuć r....@solr.pl wrote:

Hello!

You mean that when you type in plural form, you also find singular
and
all the cases like buy, bought should be find when typing buy ? Then
you also should look at analysis, because its a matter of the
correct
language analysis:
Elasticsearch Platform — Find real-time answers at scale | Elastic...
.

--
Regards,
Rafał Kuć
Sematext ::http://sematext.com/::Solr - Lucene - Nutch -
Elasticsearch

AAX ->> AAA I meant similarity so when I will write CAT I will
always

fins CATS etc.
On 29 Cze, 14:07, Rafał Kuć r....@solr.pl wrote:

Hello!

Use boolean query with OR to get all documents with at least one
term,
than use phrase query to boost the documents that have the words
close
to each other (look at the phrase sloop to see how you control
that)
and finally use boosting query to boost the documents that have
all
the terms in the field you are searching on. Of course all of
that
should be combined into a single query for Elasticsearch to do
all the
score calculation for you.

I don't know what you want to achieve when you say you want to
have
results of 'AAX' when querying for 'AAA'.

--
Regards,
Rafał Kuć
Sematext ::http://sematext.com/::Solr- Lucene - Nutch -
Elasticsearch

Heh yeah I know that it's kind of problem with answers like
"you can
or you can or you can" and it all depends on what you need...
problem
is that it's hard to start using this search engine because of
lack of
documentation tuts etc
I would like to use it only in one case I'm searching the
documents
using only one field always and I want to build the most
standard
search engine for frazes that will return results from best
similarity
to lower and so on...
so if I have a fraze like "AAA BBB CCC" search results will be
like:
AAA BBB CCC
AAX BBB CCC
AAA BBB
AAX BBB
AAA
AAX
On 29 Cze, 13:28, Rafał Kuć r....@solr.pl wrote:

Hello!

Its hard to give a general query that will work in all
situations, I
don't think it's even possible. You should think what fields
in your
index are important to you (and use boosting on those), you
should
think if you want phrase queries to be used to boost documents
that
have them present. You may also want to have some fields boost
score
of your documents (for example number of likes or recent date)
so you
may want to use custom score query. And many, many more 'You
may'.

You should think what you want Elasticsearch to return and how
and
this way construct your queries.

--
Regards,
Rafa³ Kuæ
Sematext ::http://sematext.com/::Solr-Lucene - Nutch -
Elasticsearch

anyone? I'm looking for best configuration of query_string
for
searching results?

Hello Rafa

I read your comments about adding boost to fields in a document during
indexing and post indexing. I'm a beginner in Elasticsearch and cant seem
to get it working. Can you give me an example of how exactly to use boost.
I really need it for what I'm trying to do. A quick help will be greatly
appreciated. thanks!

On Friday, June 29, 2012 4:28:28 AM UTC-7, Rafał Kuć wrote:

Hello!

Its hard to give a general query that will work in all situations, I
don't think it's even possible. You should think what fields in your
index are important to you (and use boosting on those), you should
think if you want phrase queries to be used to boost documents that
have them present. You may also want to have some fields boost score
of your documents (for example number of likes or recent date) so you
may want to use custom score query. And many, many more 'You may'.

You should think what you want Elasticsearch to return and how and
this way construct your queries.

--
Regards,
Rafał Kuć
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch -
Elasticsearch

anyone? I'm looking for best configuration of query_string for
searching results?

That would be so nice If you could show an example of such query with many
nested options boosts etc.

W dniu poniedziałek, 2 lipca 2012 18:20:07 UTC+2 użytkownik Shadow napisał:

Hello Rafa

I read your comments about adding boost to fields in a document during
indexing and post indexing. I'm a beginner in Elasticsearch and cant seem
to get it working. Can you give me an example of how exactly to use boost.
I really need it for what I'm trying to do. A quick help will be greatly
appreciated. thanks!

On Friday, June 29, 2012 4:28:28 AM UTC-7, Rafał Kuć wrote:

Hello!

Its hard to give a general query that will work in all situations, I
don't think it's even possible. You should think what fields in your
index are important to you (and use boosting on those), you should
think if you want phrase queries to be used to boost documents that
have them present. You may also want to have some fields boost score
of your documents (for example number of likes or recent date) so you
may want to use custom score query. And many, many more 'You may'.

You should think what you want Elasticsearch to return and how and
this way construct your queries.

--
Regards,
Rafał Kuć
Sematext :: http://sematext.com/ :: Solr - Lucene - Nutch -
Elasticsearch

anyone? I'm looking for best configuration of query_string for
searching results?

could anyone provide some exaples that are more complex than the ones on
elasticsearch web page or some sources where they can be found ???

On Wed, 2012-07-04 at 04:12 -0700, Marcin Oleszkiewicz wrote:

could anyone provide some exaples that are more complex than the ones
on elasticsearch web page or some sources where they can be found ???

Marcin, why don't you show us what you've tried, what you're trying to
do, and what doesn't work for you.

That way it'll be much easier to give you useful advice

Have a look at Elasticsearch Platform — Find real-time answers at scale | Elastic

clint

at the moment I know (thanks to Rafał) how should I build such query

  1. BOOLEAN query with OR that will find all docs with at least one term
  2. PHRASE_QUERY to boost documents with words close to each other (using
    sloop)
  3. BOOSTING QUERY to boost that have all terms in the field
  4. use some language plugin

how to combine it to a query, it's kinda hard fo a newbie

Hi Marcin

You're not alone; i've found the query DSL quite difficult to understand.

This is what i have for my search so far. It's basically a wildcard text search which is then filtered to restrict access based on some
of the document properties.

Perhaps this is even more basic than you're looking for. I'm only just starting out with ES and have never used Lucene before.
I imagine what i have done would be considered absolutely terrible by those "in the know".

https://gist.github.com/3053914

I'd be very grateful if someone who has a good understanding of the ES query DSL could take a look at that gist and provide some feedback about the way i've done it and possibly show me how to improve it and/or some alternative implementations.

A tutorial about the DSL structure would be good (for totally new users) but i have not seen anything very helpful to me yet.
It's just been lots of head-scratching and trial-&-error so far. :slight_smile:

cheers

  • shaun

--
shaun etherton
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

On Thursday, 5 July 2012 at 9:52 PM, Marcin Oleszkiewicz wrote:

at the moment I know (thanks to Rafał) how should I build such query

  1. BOOLEAN query with OR that will find all docs with at least one term
  2. PHRASE_QUERY to boost documents with words close to each other (using sloop)
  3. BOOSTING QUERY to boost that have all terms in the field
  4. use some language plugin

how to combine it to a query, it's kinda hard fo a newbie