Unable to get fields from index created using couchdb river

Hi,

elasticsearch version:
couchdb river version:

Created the river with no changes to the defaults and let elasticsearch
decide on all the defaults. I can query the river and the results are
correct. I need to create result sets that have 2-3 terms so i can count
and group them myself to create sql group by type results. For every
document that matches the time range below I would like to have the
individual hit record the value of other terms in the result.

  • }
  • dox_print_events: {
    • _source: {
      • includes: [
        • meta.*
          ]
          }

Using the query below I never get any of the fields returned. I must
not be understanding mappings.

es.search(
    {

        "fields": "dox_print_events.ip",
        "query": {
            "bool": {
                "must": [
                    {
                        "range": {
                            "dox_print_events.date_time_recorded": {
                                "from": isoStart,
                                "to": isoEnd
                            }
                        }
                    }
                ],
                "must_not": [],
                "should": []
            }
        },
        "size": 500

    },

Rinaldo

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Hi Rinaldo,
According to your mappings, you are only storing meta.* in the _source.
Then in your query you are trying to return a field
called dox_print_events.ip that will never be kept in the meta.

I recommend running your query and not specifying fields. This will return
the full _source, so you can see what is actually getting stored currently
and what exactly it is called. You may need to tweak or completely remove
the _source includes item to get what you are looking for.

Also, dox_print_events.ip may not even be a correct field name, as it
appears dox_print_events is the type, which shouldn't be specified when
accessing fields. Although, this could be correct, if you have an object
called dox_print_events indexed.

Best Regards,
Paul

On Monday, November 25, 2013 11:19:33 AM UTC-5, Rinaldo DiGiorgio wrote:

Hi,

elasticsearch version:
couchdb river version:

Created the river with no changes to the defaults and let elasticsearch
decide on all the defaults. I can query the river and the results are
correct. I need to create result sets that have 2-3 terms so i can count
and group them myself to create sql group by type results. For every
document that matches the time range below I would like to have the
individual hit record the value of other terms in the result.

  • }
  • dox_print_events: {
    • _source: {
      • includes: [
        • meta.*
          ]
          }

Using the query below I never get any of the fields returned. I must
not be understanding mappings.

es.search(
    {

        "fields": "dox_print_events.ip",
        "query": {
            "bool": {
                "must": [
                    {
                        "range": {
                            "dox_print_events.date_time_recorded": {
                                "from": isoStart,
                                "to": isoEnd
                            }
                        }
                    }
                ],
                "must_not": [],
                "should": []
            }
        },
        "size": 500

    },

Rinaldo

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

On Monday, November 25, 2013 2:25:49 PM UTC-5, ppearcy wrote:

Hi Rinaldo,
According to your mappings, you are only storing meta.* in the _source.
Then in your query you are trying to return a field
called dox_print_events.ip that will never be kept in the meta.

I recommend running your query and not specifying fields. This will return
the full _source, so you can see what is actually getting stored currently
and what exactly it is called. You may need to tweak or completely remove
the _source includes item to get what you are looking for.

I should have included that in the original post. I am getting an index to
the document back. Yet when I search for something and use facets, it lists
all the values. The docs say that everything is indexed. The river plugin
has no comments about what it stores. It looks like it stores a pointer to
the docs. I am trying to understand why a facet will return the values. I
did not look but the response time was pretty fast so I am assuming the
facet code is not going back to couchdb to fetch the values. I have
started a new load from couchdb and I am getting the same results. It is
all a little vague and seems to require many questions to do the simplest
things. I really appreciate your response. I have to figure out how to tell
it to index the source or download the code and figure out why the code and
the docs are so hard for me to understand.

{
"took" : 247,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 16463606,
"max_score" : 1.0,
"hits" : [ {
"_index" : "dox_print_events",
"_type" : "dox_print_events",
"_id" : "1345696317043",
"_score" : 1.0, "_source" : {}
}, {

Also, dox_print_events.ip may not even be a correct field name, as it
appears dox_print_events is the type, which shouldn't be specified when
accessing fields. Although, this could be correct, if you have an object
called dox_print_events indexed.

I do -- I am using head and it tends to display an index as a type which
makes sense in terms of definitions but it confused me. Going forward I am
adding index and type after the name since I have not graduated to having
multiple types in one index yet.

Best Regards,
Paul

On Monday, November 25, 2013 11:19:33 AM UTC-5, Rinaldo DiGiorgio wrote:

Hi,

elasticsearch version:
couchdb river version:

Created the river with no changes to the defaults and let
elasticsearch decide on all the defaults. I can query the river and the
results are correct. I need to create result sets that have 2-3 terms so i
can count and group them myself to create sql group by type results. For
every document that matches the time range below I would like to have the
individual hit record the value of other terms in the result.

  • }
  • dox_print_events: {
    • _source: {
      • includes: [
        • meta.*
          ]
          }

Using the query below I never get any of the fields returned. I must
not be understanding mappings.

es.search(
    {

        "fields": "dox_print_events.ip",
        "query": {
            "bool": {
                "must": [
                    {
                        "range": {
                            "dox_print_events.date_time_recorded": {
                                "from": isoStart,
                                "to": isoEnd
                            }
                        }
                    }
                ],
                "must_not": [],
                "should": []
            }
        },
        "size": 500

    },

Rinaldo

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.