Is there any way in which i can search for phrases with special charecters in the content of the attached file? for eg: i want to search for asn@xyz.com in the contents of all the indexed files.
I actually tried it on my code and it seems to be like '@' is not considered and instead it is searching for asn, xyz and com separately and generating results. How can I solve this?
From the link you have provided, I understood that using a custom analyzer would help us solve this problem. But I have a doubt .
Is it possible to add multiple analyzers on the same field name? Because as I'm working on attachments and for better search performance i added "english" analyzer already on the Attachment. So is it possible to add another analyzer?
something like this:
var createIndexResponse =
client.CreateIndex(defaultIndex, c => c
.Mappings(m => m
.Map<Document>(mp => mp
.Properties(ps => ps
.Number(n => n.Name(e => e.Id))
.String(s => s.Name(e => e.Title))
.Attachment(s => s.Name(p => p.File)
.FileField(ff => ff.Name(f => f.File)
.TermVector(TermVectorOption.WithPositionsOffsetsPayloads)
.Analyzer("english")
.Store(true)))))));
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.