Hi, I am new to elasticsearch and have spent the last two weeks trying to learn everything i can to the best of my ability but as one can imagine it is somewhat overwhelming from a new-coming standpoint.
I am trying to import MySQL data as suggestions, This currently works fine however the problem comes when i attempt to add payload data such as a userId field, My initial thoughts was to perform the following query.
SELECT user_id as 'suggestion.payloads.userId' FROM MyTable WHERE MyColumn = MyValue;
After doing some digging through the logs to see what the issue was, I get the following error message:
MapperParsingException[Field name [suggestion.payloads.userId] cannot contain '.']
Would anyone be able to lend a helping hand to overcome this issue, Any help or advice would be hugely appreciated, I have been trying all day / night to resolve this but it seems im missing something and due to my lack of knowledge.
Did you try SELECT user_id as '[suggestion][payloads][userId]' ...? If that doesn't work I suspect you have to select fields with flat names and rename them afterwards.
I have also performed a suggestion query to double check the field definitely wasn't part of the payload and it confirmed it did not work.
After reading the url provided, I am trying to put a config file together and will do some testing. Would you say this is along the right lines or am i getting it all worng because when ever i run the config file below i get the following error message
"exception"=>"expecting List or Map, found class org.logstash.bivalues.StringBiValue
@magnusbaeck - Would you be willing to help me out with an example of how i can go about converting the userid field to a nestable field that logstash to enable logstash to put the given field into suggestion.payloads
I have been trying the last 48 hours and have had no luck what so ever, I've literally hit stale mate with the project until i can overcome the issue i have with being able to index the data with the required fields.
I tried using the rename method but im certain i am doing it wrong.
I would be greatly appreciative if you could help me overcome the issue and possibly provide an example of how you would have your config file to achieve the desired result when using an test sql statement like so:
select userid from mytable where myvalue is <= 10
How do i then get the userid value's to the correct format so elasticsearch will know that im sending this as a suggest.payloads.userid field
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.