DataFrame.
es_match
Filters data with an Elasticsearch match, match_phrase, or multi_match query depending on the given parameters and columns.
match
match_phrase
multi_match
Read more about Full-Text Queries in Elasticsearch
By default all fields of type ‘text’ within Elasticsearch are queried otherwise specific columns can be specified via the columns parameter or a single column can be filtered on with eland.Series.es_match()
columns
eland.Series.es_match()
All additional keyword arguments are passed in the body of the match query.
String of text to search for
List of columns to search over. Defaults to all ‘text’ fields in Elasticsearch
If True will use match_phrase instead of match query which takes into account the order of the text parameter.
text
If True will apply a boolean NOT (~) to the query. Instead of requiring a match the query will require text to not match.
If given and matching against multiple columns will set the multi_match.type setting
multi_match.type
When True this function will raise an error if any non-text fields are queried to prevent fields that aren’t analyzed from not working properly. Set to False to ignore this preventative check.
Specify which analyzer to use for the match query
Specify the fuzziness option for the match query
A filtered eland.DataFrame with the given match query
eland.DataFrame
Examples
>>> df = ed.DataFrame("localhost:9200", "ecommerce") >>> df.es_match("Men's", columns=["category"]) category currency ... type user 0 [Men's Clothing] EUR ... order eddie 4 [Men's Clothing, Men's Accessories] EUR ... order eddie 6 [Men's Clothing] EUR ... order oliver 7 [Men's Clothing, Men's Accessories, Men's Shoes] EUR ... order abd 11 [Men's Accessories, Men's Clothing] EUR ... order eddie ... ... ... ... ... ... 4663 [Men's Shoes, Men's Clothing] EUR ... order samir 4667 [Men's Clothing, Men's Shoes] EUR ... order sultan 4671 [Men's Clothing] EUR ... order jim 4672 [Men's Clothing] EUR ... order yahya 4674 [Women's Accessories, Men's Clothing] EUR ... order jackson <BLANKLINE> [2310 rows x 45 columns]