Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9255309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T11:41:19+00:00 2026-06-18T11:41:19+00:00

I am having some difficulty structuring the exact Elasticsearch query that I am looking

  • 0

I am having some difficulty structuring the exact Elasticsearch query that I am looking for, specifically using the java api.

It seems like if I construct a fieldsearch using the java api, I can only use a single field and a single term. If I use a querystring, it looks like I can apply an entire query to a set of fields. What I want to do is apply a specific query to one field, and another query to a different field.

This is confusing I know. This is the type of query I would like to construct

(name contains "foo" or name contains "bar") AND ( date equals today)

I am really loving Elasticsearch for it’s speed and flexibility, but the docs on http://www.elasticsearch.org/ are kind of tough to parse (I noticed “introduction” and “concepts” have no links, but the API section does) If anyone has some good resources on mastering these queries, I’d love to see them. Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T11:41:20+00:00Added an answer on June 18, 2026 at 11:41 am

    Sounds like a bool query with 2 must clause:

    • matchQuery(“name”, “foo bar”)
    • rangeQuery(“date”).from(“2013-02-05”).to(“2013-02-06”)

    Does it help?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having some difficulty with a SELECT query that should be rather easy. Here's
I've been having some difficulty with Matplotlib's finance charting. It seems like their candlestick
I am having some difficulty generating a query that works in the situation I
I'm having some difficulty using picture boxes as buttons. I'd like to have custom
I'm having some difficulty using the API function QueueUserAPC . Basically, I created a
I'm having some difficulty writing some Unit Tests to test a custom ModelBinder that
I'm having some difficulty with my Entity Framework context that is proving very troublesome
I'm having some difficulty installing Node and Coffeescript. I have installed node using homebrew
I'm having some difficulty understanding how to validate a date (DOB) using MVC2. What
I am having some difficulty using a UIWebView to render PDF files on the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.