I have a Index created by FSCRAWLER of a document (either HTML or PDF).
This index has many (what I assume are) auto created fields.
My needs are simple, I need to search withing the ID of the document (which) will be using the filename for the ID and MORE importantly, I also I need to search within the TITle meta field. (meta.title or meta.raw.title)
Im using entity framework and NEST api, so I assume I need to create a mapping so I can search within the mapped field.
Im currently just testing this ability before going further, So I just have a basic search and map class. Index named "data" of type "_doc"
var settings = new ConnectionSettings(new Uri("http://localhost:9200")).DefaultIndex("data").DefaultTypeName("_doc");
var client = new ElasticClient(settings);
var searchResponse = client.Search<Data>(s => s
.Query(q => q
.Match(m => m
.Field(f => f.Content)
.Query("mySearchText")
)
)
);
This search works fine in the Content filed (its mapped in my class)
and this is my simple mapping class...
[ElasticsearchType(IdProperty = "_Id")]
public class Data
{
public string _Id { get; set; }
public string Content { get; set; }
public string Title {get; set;}
}
Above I tried grabbing the IdProperty to see if I could search within it, and it did not work.
I need some help, tried the NEST documentation but I think I need a real world example. Been searching for days and this is holding me up.
Maybe I can modify the Indexing settings on FSCRAWLER to index this meta field differently so its easier to map? Any help would be MUCH appreciated. TIA!