using scroll and choosing on types

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

using scroll and choosing on types

sujoysett
Hi,

One confusion about using search types in scroll ....

curl -XGET '<host>:<port>/<index>/_search?search_type=scan&scroll=10m&size=50&pretty=1' -d '{
    "query" : {
        "match_all" : {}
    }
}'

gives me only the scroll ID and an empty array in hits. This is expected. Next I use this scroll ID to get hits, chaining the returned scroll ID in every subsequent request.


curl -XGET '<host>:<port>/<index>/_search?search_type=dfs_query_then_fetch&scroll=10m&size=50&pretty=1' -d '{
    "query" : {
        "match_all" : {}
    }
}'

gives me the scroll ID and some hits. Why the hits are also getting returned in this step when using dfs_query_then_fetch instead of scan?

Tried using POST and not GET, but same results.

Any help?

Thanks,
- Sujoy.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: using scroll and choosing on types

sujoysett
Hi,

Sorry for repeated request, but I am still confused on this issue.
Am I doing something wrong in my query, or missing any additional parameter?

Thanks in advance,
- Sujoy.


On Friday, June 14, 2013 12:49:34 PM UTC+5:30, Sujoy Sett wrote:
Hi,

One confusion about using search types in scroll ....

curl -XGET '<host>:<port>/<index>/_search?search_type=scan&scroll=10m&size=50&pretty=1' -d '{
    "query" : {
        "match_all" : {}
    }
}'

gives me only the scroll ID and an empty array in hits. This is expected. Next I use this scroll ID to get hits, chaining the returned scroll ID in every subsequent request.


curl -XGET '<host>:<port>/<index>/_search?search_type=dfs_query_then_fetch&scroll=10m&size=50&pretty=1' -d '{
    "query" : {
        "match_all" : {}
    }
}'

gives me the scroll ID and some hits. Why the hits are also getting returned in this step when using dfs_query_then_fetch instead of scan?

Tried using POST and not GET, but same results.

Any help?

Thanks,
- Sujoy.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: using scroll and choosing on types

Alexander Reelsen-2
Hey,

you cannot combine dfs search type with scroll request parameters. The scroll parameter only works if the search type is scan.
What are you trying to achieve by mixing these?


--Alex


On Tue, Jun 18, 2013 at 6:48 AM, Sujoy Sett <[hidden email]> wrote:
Hi,

Sorry for repeated request, but I am still confused on this issue.
Am I doing something wrong in my query, or missing any additional parameter?

Thanks in advance,
- Sujoy.


On Friday, June 14, 2013 12:49:34 PM UTC+5:30, Sujoy Sett wrote:
Hi,

One confusion about using search types in scroll ....

curl -XGET '<host>:<port>/<index>/_search?search_type=scan&scroll=10m&size=50&pretty=1' -d '{
    "query" : {
        "match_all" : {}
    }
}'

gives me only the scroll ID and an empty array in hits. This is expected. Next I use this scroll ID to get hits, chaining the returned scroll ID in every subsequent request.


curl -XGET '<host>:<port>/<index>/_search?search_type=dfs_query_then_fetch&scroll=10m&size=50&pretty=1' -d '{
    "query" : {
        "match_all" : {}
    }
}'

gives me the scroll ID and some hits. Why the hits are also getting returned in this step when using dfs_query_then_fetch instead of scan?

Tried using POST and not GET, but same results.

Any help?

Thanks,
- Sujoy.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: using scroll and choosing on types

sujoysett
Hi Alex,

The applications I work on needs processing and remodeling of data indexed in ES, which necessarily involves re-indexing of documents.

When such processing runs on an entire index, we use scroll along with scan search type and match_all query.
But when we need a processing re-run on selective documents, we use scroll with dfs_query_then_fetch search type and requirement specific term or range query.

I don't know why you are saying these can not be mixed. It does work, and it is working in my code from ES version 0.19.* onward. I actually revisited my code before posting this reply just to confirm my words.

-- Sujoy.




On Monday, June 24, 2013 6:56:52 PM UTC+5:30, Alexander Reelsen wrote:
Hey,

you cannot combine dfs search type with scroll request parameters. The scroll parameter only works if the search type is scan.
What are you trying to achieve by mixing these?


--Alex


On Tue, Jun 18, 2013 at 6:48 AM, Sujoy Sett <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="VcObwz8S2N4J">sujo...@...> wrote:
Hi,

Sorry for repeated request, but I am still confused on this issue.
Am I doing something wrong in my query, or missing any additional parameter?

Thanks in advance,
- Sujoy.


On Friday, June 14, 2013 12:49:34 PM UTC+5:30, Sujoy Sett wrote:
Hi,

One confusion about using search types in scroll ....

curl -XGET '<host>:<port>/<index>/_search?search_type=scan&scroll=10m&size=50&pretty=1' -d '{
    "query" : {
        "match_all" : {}
    }
}'

gives me only the scroll ID and an empty array in hits. This is expected. Next I use this scroll ID to get hits, chaining the returned scroll ID in every subsequent request.


curl -XGET '<host>:<port>/<index>/_search?search_type=dfs_query_then_fetch&scroll=10m&size=50&pretty=1' -d '{
    "query" : {
        "match_all" : {}
    }
}'

gives me the scroll ID and some hits. Why the hits are also getting returned in this step when using dfs_query_then_fetch instead of scan?

Tried using POST and not GET, but same results.

Any help?

Thanks,
- Sujoy.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="VcObwz8S2N4J">elasticsearc...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.