1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to search ES from the command line

Discussion in 'Enhanced Search Support' started by AndyB, Apr 10, 2013.

  1. AndyB

    AndyB Well-Known Member

  2. Slavik

    Slavik XenForo Moderator Staff Member

    AndyB likes this.
  3. AndyB

    AndyB Well-Known Member

    Hi Slavik,

    The problem I don't know what the search field options are. Are you talking about message and title or some other field? Could you provide an example of a command line that would search the message text for "test1234".

    Thank you.
  4. MattW

    MattW Well-Known Member

  5. AndyB

    AndyB Well-Known Member

    MattW likes this.
  6. AndyB

    AndyB Well-Known Member

    I would like to be able to search by user_id and keyword, but this doesn't work.

    curl 'http://localhost:9200/database_name/_search?user=1&q=message:andy'

    I need to find the correct user=1 part of this command.
  7. MattW

    MattW Well-Known Member

  8. AndyB

    AndyB Well-Known Member

    Unfortunately that returns the same results as without the user switch.

    I now see why. Reading Slavik's post #2 I can see that the URI type of command is very limited.

    Looks like I have to learn how to do a DSL type of query in order to do more advances queries. More information here for me to read.

    MattW likes this.

Share This Page