Is there a way in ES to change a value in a search string to some list of values? For example, if my documents have a field called frequency and the user searches for monthly, it should return any documents with frequency as month, m, monthly, etc. I can roll my own on the client side, but I seem to recall hearing that I can define these myself in ES.
(totally new to ES)
I think what you are looking for is Synonyms functionality. It can expand your monthly query into so-called synonyms which you can preconfigure in advance.
Related
ONE elastic index that stores visitor data for restaurants in chennai and in New york.
The query must return data for 8-9am in chennai and 8-9am in newyork. Since the data is in one index, is there a way to ignore the timeszone in the timestamp and query elastic data?
or is it possible to solve this problem without multiple query?
The approach I am taking is to convert and store local date time (without timezone info) into a long integer yymmddhhmmss and query it. This will support lte and gte queries too.
it's not possible, no, because they are two totally different timezones/timestamps
I have simple data analytics to display in AWS QuickSight: some date fields and amounts. QS aggregates by default all date-fields and the lowest granularity is aggregate by minute. But my need is to display all data without any aggregation at all. I have searched but not found how it could be possible disable aggregation at all? Any ideas?
First contribution to Stack Overflow, feels good man.
I ran into the same problem and the solution is to convert the field selected for the y-axis to a dimension rather than a measure.
Converting fields from measure to dimension
Aggregations will automatically be applied to 'measure' fields and therefore they need to be converted to 'dimension'
Good day:
I have an indexed field called amount, which is of string type. The value of amount can be either one or 1. Say in this example, we have amount=1 as an indexed document but, I try to search for one, ElasticSearch will not return the value unless I put 1 for the search query. Thoughts on how I can get this to work? I'm thinking a tokenizer is what's needed.
Thanks.
You probably don't want this for sevenmillionfourhundredfifteenthousendtwohundredfourteen and the like, but only for a small number of values.
At index time I would convert everything to a proper number and store it in a numerical field, which then even allows to sort --- if you need it. Apart from this I would use synonyms at index and at query time and map everything to the digit-strings, but in a general text field that is searched by default.
I'm new to elasticsearch, and I have data that have two fields time and received_time. I want to make sure that all records matching the query have the difference within a threshold. How do I achieve that effectively? The official documentation only talks about "now" or literal values. Thanks in advance.
Edit: if it matters, I need both a minimum value and a maximum value. Thanks.
How can i boost documents having sub-objects over documents without having such sub-objects even if i don't query directly for information of sub-objects?
Here an example:
I put events in my search index. Each event has a name and optional one ore more dates. you can search for events by name. I want the matching events with dates to become the first results. Events that also match by name but don't have a date should come afterwards.
You can create "has_dates" field and use boosting query boosting objects with "has_dates" field.