I do elasticsearch indexing, but the first 2 characters after the space character do not search. For example, when I search for "John", the results come, but when I search for "John S", the result is not available. The number is 4.5 million data. Then I indexed another 250 registered data. When I run this, it does the search process without any problems with whitespace characters. I use C # with the NEST library. Have an idea?
It's impossible to answer without knowing the details, like the mapping, the type of query you are running, etc...
Could you provide a full recreation script as described in About the Elasticsearch category. It will help to better understand what you are doing. Please, try to keep the example as simple as possible.
A full reproduction script is something anyone can copy and paste in Kibana dev console, click on the run button to reproduce your use case. It will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.
sorry i fixed the type would prefix. Please help.
this query is the total result 0
GET searchdemoelastic/_search
{
"from" : 0,
"size" : 10,
"query": {
"multi_match" : {
"query": "bozkar d",
"type": "phrase_prefix",
"fields": [ "title", "registernumber" ]
}
}
}
but this way the result comes.
GET searchdemoelastic/_search
{
"from" : 0,
"size" : 10,
"query": {
"multi_match" : {
"query": "bozkar den",
"type": "phrase_prefix",
"fields": [ "title", "registernumber" ]
}
}
}
this is my code in c#
var searchResponse = eClient.Search<GlobalCompany>(s => s.Index(INDEX_NAME).From(0).Size(10)
.Query(q => q
.MultiMatch(m => m
.Fields(f => f
.Field(u => u.Title)
.Field(u => u.RegisterNumber))
.Type(TextQueryType.PhrasePrefix)
.Query(value))));
Any chance we can get a full script with data, index mapping if any, etc so we can just run it from Kibana Dev Console as I asked? See again About the Elasticsearch category for an example.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.