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 7725917
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:04:33+00:00 2026-06-01T05:04:33+00:00

I need your help to translate a query into pyes. This query is working

  • 0

I need your help to translate a query into pyes. This query is working properly, the problem is that I can’t use pyes to make it work:

curl -XGET 'http://127.0.0.1:9200/my_index/user/_search?pretty=1' -d '{
    "query" : {
        "bool":{
            "should": [
               { "text": { "first_name": "em" }},
               { "text": { "first_name.partial": "em" }}
             ]
        }
    }
}'

First I was doing this, according to 0.17 docs:

q1 = TextQuery("first_name","em")
q2 = TextQuery("first_name.partial","em")
q = BoolQuery(should=[q1, q2])
conn.search(q,indices='my_index',doc_types='user')

After a few exceptions raised, i realized that i’ve installed 0.16, because 0.17 is an unstable branch.

So, to put it simple: How can I translate search that query with pyes?

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-01T05:04:35+00:00Added an answer on June 1, 2026 at 5:04 am

    It doesn’t seem to be possible to translate your query into pyes 0.16. As you can see the TextQuery constructor in 0.16 doesn’t have the field parameter: https://github.com/aparo/pyes/blob/109f84696153f3be474e1d7d261776a1bca04570/pyes/query.py#L856 and it seem to generate invalid elasticsearch queries. On the other side your code should work fine in 0.17.

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

Sidebar

Related Questions

ive being trying to cope with this problem but still. I need your help.
I need your help. This works so far that I will get alerts when
I really need your help for this. I am relatively new to programming and
Need your help with my PHP/MYSQL array. I have a php script that selects
Need your help guys in forming a query. Example. Company - Car Rental Table
I need your help :( I'm working on a iOS application in which i
I need your help, I'm learning the coreData migration and I can't access to
Need your help, trying to change this script: https://github.com/MrHus/jquery-monthly-ical To load external JSON data
I need your help in understanding the below query. SELECT To_date(To_char(( ( To_timestamp_tz(From_tz(Cast(l_end_date AS
i need your help in access db i have a table like this ID

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.