I like to use elasticsearch as Nosql database + search engine for data 
coming from text files (router configs) and databases .
  First I moved a routerconfig to a json file which I indexed .

  Mapping:

{
  "configs" : {
    "mappings" : {
      "test" : {
        "properties" : {
          "ConfLength" : {
            "type" : "string"
          },
          "NVRAM" : {
            "type" : "string"
          },
          "aaa" : {
            "type" : "string"
          },
          "enable" : {
            "type" : "string"
          },
          "hostname" : {
            "type" : "string"
          },
          "lastChange" : {
            "type" : "string"
          },
          "logging" : {
            "type" : "string"
          },
          "model" : {
            "type" : "string"
          },
          "policy-map" : {
            "type" : "string"
          }
        }
      }
    }
  }
}


Document:

{
"_index" : "configs",
"_type" : "test",
"_id" : "7",
"_score" : 1,
"_source" : {
"hostname" : [
"hostname test-1234"
]
}
},


Example of a simple search:  search a hostname.

*If I start a query*:   

*curl -XGET 'http://127.0.0.1:9200/configs/_search?q="hostname test-1234"'*
curl: (52) Empty reply from server

No respone

If I start a second query without hostname if got an answer:

*curl -XGET 'http://127.0.0.1:9200/configs/_search?q="test-1234";'*
OKE

Analyser: standard

Why a search instruction can find "test-1234" but not "hostname test-1234" 
? 













-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/b25127bb-2dca-440c-a7b3-937b5ddccd6d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to