# White spaces and wild cards

**URL:** <https://discuss.elastic.co/t/white-spaces-and-wild-cards/20975>\
**Category:** Elasticsearch\
**Created:** [November 28, 2014, 8:29am UTC](https://discuss.elastic.co/t/white-spaces-and-wild-cards/20975 "2014-11-28T08:29:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pablo3027](https://avatars.discourse-cdn.com/v4/letter/p/9e8a1a/32.png) [@pablo3027](https://discuss.elastic.co/u/pablo3027)\
**Post date:** [November 28, 2014, 8:29am UTC](https://discuss.elastic.co/t/white-spaces-and-wild-cards/20975/1 "2014-11-28T08:29:58Z")

</div>

Hi we have this problems with querys (we use the last ElasticSearch 1.4.1)

The query target is this string "MANTENIMIENTOS FERNANDEZ"  
]  
We have this query:

POST /GDATADEC-1/invoice/\_search  
{  
"query": {  
"query\_string" : {  
"query" : "_mantenimie_fer\*"  
}  
}  
}

This query don't have any results, but if we launch this,\* the same string  
query with a white space\*, we have results:

POST /GDATADEC-1/invoice/\_search  
{"query": {  
"query\_string" : {  
"query" : "_mantenimie_ fer\*"  
}  
}  
}

The context :

Our mapping :

{  
"invoice": {  
"\_source" : {  
"excludes" : []  
},  
"\_timestamp": {  
"enabled": true,  
"format": "dd-MM-yyyy HH:mm:ss||yyyy-MM-dd'T'HH:mm:ss.SSSZZ"  
},  
"dynamic": "strict",  
"properties": {

```
     "idfactura": {
        "type": "integer",
        "doc_values": true,
        "null_value": -1,
        "index" : "not_analyzed"
     },
      
     "cliente": {
        "properties": {
           "cif": {
              "type": "string",
              "null_value" : "",
              "analyzer" : "ddol_analyzer",
              "index_options": "docs",
              "boost": 2,
              "include_in_all": true
           },
           "direccion": {
              "type": "string",
              "null_value" : "",
              "analyzer" : "ddol_analyzer",
              "index_options": "docs",
              "boost": 1.5,
              "include_in_all": true
           },
           "idcliente": {
              "type": "integer", 
              "doc_values": true,
              "index" : "not_analyzed"
           },
           "razonsocial": {
              "type": "string",
              "null_value" : "",
              "boost": 2,
              "include_in_all": true,
              "analyzer" : "ddol_analyzer",
              "index_options": "docs",
              "fields" : {
                  "raw":{
                   "type": "string",    
                   "index": "not_analyzed"
                   }
               }
           }
        }
     }
  }

```

}  
}

Our analyzer: (we try with the default analyzer and we have the same  
results.... no results on the query

{  
"analysis": {  
"analyzer": {  
"ddol\_analyzer": {  
"type": "custom",  
"tokenizer": "whitespace",  
"filter": ["lowercase"]  
}  
}  
}  
}

Thanks

--  
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](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/efeb1b61-5637-451a-a2fd-ada63d0ab60c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/efeb1b61-5637-451a-a2fd-ada63d0ab60c%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 12:47am UTC](https://discuss.elastic.co/t/white-spaces-and-wild-cards/20975/2 "2017-07-06T00:47:12Z")

</div>


