Hi All,
i'm new to elastic search and wanted to index files with some of the attributes like Author, Title, Subject, Category, Community etc.
How far i reached :-
i was able to create a attachment pipeline and was able to ingest the different docs in the elastic with attributes. see below how i did:-
-
created pipeline by following request:-
{
"description" : "Extract attachment information",
"processors" : [
{
"attachment" : {
"field" : "data"
}
}
]
} -
upload an attachment via following code :-
{
"filename":"Presentations-Tips.ppt",
"Author":"Jaspreet",
"Category":"uploading ppt",
"Subject":"testing ppt",
"fileUrl":"",
"attributes":{"attr11":"attr11value","attr22":"attr22value","attr33":"attr33value"},
"data": "here_base64_string_of_file"
} -
then able to search freely on the all the above attributes and on file content as well:-
{
"query":{
"query_string":{
"query":"test"
}
}
}
Now what I wanted is :-
Wanted to narrow down the searches through some filters like :-
- wanted to search on basis like search on specific parameters like search all those whose author must "Rohan"
- then search all whose author must be "Rohan" and category must be "Education"
- then search all whose author has letters like "han" and categories has letters "Tech"
- search all whose author is "Rohan" and can search full text search on all fields which can have "progress" in any field, means first naroow down search for author and then full text search on those resultset fields.
Please help me with proper query syntax and call url like for above full text search I used 'GET /my_index/_search'