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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T11:15:05+00:00 2026-06-14T11:15:05+00:00

In ElasticSearch, I am wondering how I can get back document urls as well

  • 0

In ElasticSearch, I am wondering how I can get back document urls as well in the search result set? Here is what I meant with some example.

Let’s say I index a doc using the following curl command:

curl -XPUT 'http://localhost:9200/ads/offers/1234' -d '{
  "name": "blah blah",
  "Weight":0.0001,
  ...
}'

Then I run a search and I want to get the document URL itself in the result set. In the above case, the document URL is the following:

http://localhost:9200/ads/offers/1234. 

How can I do that? Is there a special field name for this or do I have to create some kind field to store this explicitly?

  • 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-14T11:15:06+00:00Added an answer on June 14, 2026 at 11:15 am

    elasticsearch search response contains all piece that are needed to build this URL on the client. The record for the URL in you example will look like this:

    "hits" : [ {
        "_index" : "ads",
        "_type" : "offers",
        "_id" : "1234",
        ...
    

    If you really need to get this URL from elasticsearch you can use script field to combine these pieces together into a single field on the server side, although I cannot think of a legitimate scenario where it would be needed.

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

Sidebar

Related Questions

I'm trying to get ElasticSearch to work, specifically with the River Plugin. For some
I am trying to create elasticsearch query and apply filter on search result as
Love Tire and elasticsearch so far but can't figure out how to search values
I'm trying to perform an elasticsearch query with multiple fields specified. Here is some
I am pretty new to elasticsearch and just need some clarification: Can we define
I've recently started using ElasticSearch and I can't seem to make it search for
I'm having some problem with elasticsearch restarts once every 10 min. Here is the
i have elasticsearch database of geo objects. I want to search the nearest objects
is it possible elasticsearch to handle queries containing typos . Example trying to query
I am experimenting with elasticsearch as a search server and my task is to

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.