Hello everyone,
I started recently using ES, with its .net client NEST.
A lot of questions to ask.
I'm currently blocked while trying to highlight search results in
attachment field.
The indexation works well, the mapping seems correct, the encode and decode
work well too,
Once I tried to search by keyword, EA seems to be able to find the right
documents which contain the keyword, but in the highlight result, instead
of showing the decoded text, it shows nothing, or the encoded one.
Read from another post treating some same features, the solution is to set
store = yes.
So I tried to configure it in my C# class file with
[ElasticProperty(Name = "attach", Type = FieldType.Attachment,
Store=true, TermVector = TermVectorOption.WithPositionsOffsets)]
public string attach { get; set; }
and the query is the follwing
{
"fields" : ["name","attach"],
"query" : {
"query_string" : {
"query" : "settings"
}
},
"highlight" : {
"fields" : {
"attach" : {}
}
}
}
Do you have some idea?
Thanks
Another thing that I found while using EA is the encode file,
In fact, in the official "Attachment in Action" post,
http://www.elasticsearch.cn/tutorials/2011/07/18/attachment-type-in-action.html
first of all, it's under linux environment, and the commands used for
encoding files depend on some perl scripts. Finally, the contain of the
result encoded file seems to be different under a windows system and a
linux system.
Since I use .net framwork, the function that i used for encoding it's from
c# api, convert.tobase64string.
Thank you very much!
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/14ca6c4e-1b2e-4fcd-980a-a375a54b1dd5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.