Searching for string in column

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

Searching for string in column

Janusz Dalecki

Hi,

I have an elasticsearch query like this in my app:

SearchRequestBuilder srb = client.prepareSearch("asset_index").setTypes("Asset").setSearchType(

        SearchType.DEFAULT);

srb.setQuery(QueryBuilders.queryString(search));

 

where client is of type TransportClient and search==”dd”.

It finds all documents with “dd” in any column of any of my docs. How can I narrow it down to particular column, let’s say column called ‘description’.

Regards,

Janusz

 




This e-mail contains privileged and confidential information intended for the use of the addressees named above. If you are not the intended recipient of this e-mail, you are hereby notified that you must not disseminate, copy or take any action in respect of any information contained in it. If you have received this e-mail in error, please notify the sender immediately by e-mail and immediately destroy this e-mail and its attachments.

--
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].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Searching for string in column

InquiringMind
search==”description:dd”

On Friday, July 26, 2013 8:03:20 AM UTC-4, JD wrote:

Hi,

I have an elasticsearch query like this in my app:

SearchRequestBuilder srb = client.prepareSearch("asset_index").setTypes("Asset").setSearchType(

        SearchType.DEFAULT);

srb.setQuery(QueryBuilders.queryString(search));

 

where client is of type TransportClient and search==”dd”.

It finds all documents with “dd” in any column of any of my docs. How can I narrow it down to particular column, let’s say column called ‘description’.

Regards,

Janusz

 




This e-mail contains privileged and confidential information intended for the use of the addressees named above. If you are not the intended recipient of this e-mail, you are hereby notified that you must not disseminate, copy or take any action in respect of any information contained in it. If you have received this e-mail in error, please notify the sender immediately by e-mail and immediately destroy this e-mail and its attachments.

--
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].
For more options, visit https://groups.google.com/groups/opt_out.