Query for contains

Hi All,
I want to write a percolate query that match the document containing the
term as sub-string.

like a contains query.
Example:
a document in index like filed1:"dtfinanace"

must be returned in result if I search for "fields:"finance".

Any help will be highly appreciated.

Thnaks,
Pulkit Agrawal

While you could do wildcard queries, I don't believe they are very
efficient. I'd recommend using an n-gram analyzer:
http://search.lucidimagination.com/search/document/CDRG_ch05_5.5.5

Best Regards,
Paul

On Aug 8, 3:04 pm, Pulkit Agrawal pulkitdot...@gmail.com wrote:

Hi All,
I want to write a percolate query that match the document containing the
term as sub-string.

like a contains query.
Example:
a document in index like filed1:"dtfinanace"

must be returned in result if I search for "fields:"finance".

Any help will be highly appreciated.

Thnaks,
Pulkit Agrawal

Thanks Paul,

I will try that.
Does it work in percolate as well?

Regards,
Pulkit Agrawal

On Tue, Aug 9, 2011 at 3:05 AM, ppearcy ppearcy@gmail.com wrote:

While you could do wildcard queries, I don't believe they are very
efficient. I'd recommend using an n-gram analyzer:
http://search.lucidimagination.com/search/document/CDRG_ch05_5.5.5

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

Best Regards,
Paul

On Aug 8, 3:04 pm, Pulkit Agrawal pulkitdot...@gmail.com wrote:

Hi All,
I want to write a percolate query that match the document containing the
term as sub-string.

like a contains query.
Example:
a document in index like filed1:"dtfinanace"

must be returned in result if I search for "fields:"finance".

Any help will be highly appreciated.

Thnaks,
Pulkit Agrawal

Yeah, you should be able to save and percolate any query that you can
run through the search APIs.

Regards,
Paul

On Aug 9, 12:02 pm, Pulkit Agrawal pulkitdot...@gmail.com wrote:

Thanks Paul,

I will try that.
Does it work in percolate as well?

Regards,
Pulkit Agrawal

On Tue, Aug 9, 2011 at 3:05 AM, ppearcy ppea...@gmail.com wrote:

While you could do wildcard queries, I don't believe they are very
efficient. I'd recommend using an n-gram analyzer:
http://search.lucidimagination.com/search/document/CDRG_ch05_5.5.5

Elasticsearch Platform — Find real-time answers at scale | Elastic...

Best Regards,
Paul

On Aug 8, 3:04 pm, Pulkit Agrawal pulkitdot...@gmail.com wrote:

Hi All,
I want to write a percolate query that match the document containing the
term as sub-string.

like a contains query.
Example:
a document in index like filed1:"dtfinanace"

must be returned in result if I search for "fields:"finance".

Any help will be highly appreciated.

Thnaks,
Pulkit Agrawal