Hi,
I have following records:
curl -XPUT "http://localhost:9200/movies/movie/1" -d'
{
"title": "The Godfather",
"director": "Francis Ford Coppola",
"year": 1972,
"genres": ["Crime", "Drama"]
}'
curl -XPUT "http://localhost:9200/movies/movie/2" -d'
{
"title": "Lawrence of Arabia",
"director": "David Lean",
"year": 1962,
"genres": ["Adventure", "Biography", "Drama"]
}'
curl -XPUT "http://localhost:9200/movies/movie/3" -d'
{
"title": "To Kill a Mockingbird",
"director": "Robert Mulligan",
"year": 1962,
"genres": ["Crime", "Drama", "Mystery"]
}'
curl -XPUT "http://localhost:9200/movies/movie/4" -d'
{
"title": "To Kill a Mockingbird11",
"director": "Robert Mulligan",
"year": 1962,
"genres": ["Crime", "Drama values", "Mystery"]
}'
curl -XPUT "http://localhost:9200/movies/movie/5" -d'
{
"title": "Apocalypse Now",
"director": "Francis Ford Coppola",
"year": 1979,
"genres": ["Drama values test", "War"]
}'
curl -XPUT "http://localhost:9200/movies/movie/6" -d'
{
"title": "Kill Bill: Vol. 1",
"director": "Quentin Tarantino",
"year": 2003,
"genres": ["Action", "Crime", "Thriller", "Drama", "Drama values", "Drama values test"]
}'
curl -XPUT "http://localhost:9200/movies/movie/7" -d'
{
"title": "The Assassination of Jesse James by the Coward Robert Ford",
"director": "Andrew Dominik",
"year": 2007,
"genres": ["Biography", "Crime", "Drama", "Drama values"]
}'
If I search by "drama values", below are the expected results:
{
"title": "To Kill a Mockingbird11",
"director": "Robert Mulligan",
"year": 1962,
"genres": ["Crime", "Drama values", "Mystery"]
}
{
"title": "Kill Bill: Vol. 1",
"director": "Quentin Tarantino",
"year": 2003,
"genres": ["Action", "Crime", "Thriller", "Drama", "Drama values", "Drama values test"]
}
{
"title": "The Assassination of Jesse James by the Coward Robert Ford",
"director": "Andrew Dominik",
"year": 2007,
"genres": ["Biography", "Crime", "Drama", "Drama values"]
}
If I search by "drama values test", below are the expected results:
{
"title": "Kill Bill: Vol. 1",
"director": "Quentin Tarantino",
"year": 2003,
"genres": ["Action", "Crime", "Thriller", "Drama", "Drama values", "Drama values test"]
}
{
"title": "Apocalypse Now",
"director": "Francis Ford Coppola",
"year": 1979,
"genres": ["Drama values test", "War"]
}
If I search by "drama", it will display all results except following results:
{
"title": "To Kill a Mockingbird11",
"director": "Robert Mulligan",
"year": 1962,
"genres": ["Crime", "Drama values", "Mystery"]
}'
{
"title": "Apocalypse Now",
"director": "Francis Ford Coppola",
"year": 1979,
"genres": ["Drama values test", "War"]
}
I am new to elasticsearch. I tried many ways, but I did not get expected results.
Can you help me to achive this ?