Searching multiple index with different fieldsTreat child as field of parent in elastic search queryElastic Search - get records by starting character of a fieldElasticsearch global search different filter on multiple indexessubtract two fields in elastic search indexElasticSearch NEST Search Multiple Types & All FieldsElastic Search Adding a Script Field vs Adding a new Index fieldBest database for multiple-column indexes?How to get elasticsearch suggestions working on multiple fields from multiple types?How do I make a field have varying type in Elastic SearchElasticsearch - Can't search using suggestion field (“is not a completion suggest field”)
What was the average temperature of space near the Spitzer Satellite Telescope?
Should I have shared a document with a former employee?
How can electric field be defined as force per charge, if the charge makes its own, singular electric field?
How can I help our ranger feel special about her beast companion?
Is it ethical for a company to ask its employees to move furniture on a weekend?
Is Error correction and detection can be done with out adding extra bits?
Why did Fury respond that way?
Why jet engines sound louder on the ground than inside the aircraft?
Was Apollo 13 radio blackout on reentry longer than expected?
Desecrating Shabbos to ask a Gadol to daven for a patient?
Why a binary file is not shown as 0 and 1?
Amira L'Akum not on Shabbat
How would thermophilic fish survive?
How to draw a winding on a toroid of a circular cross section?
How fast does a character need to move to be effectively invisible?
Why won't some unicode characters print to my terminal?
Is this Android phone Android 9.0 or Android 6.0?
Why can't I hear fret buzz through the amp?
What is the period of Langton's ant on a torus?
Zhora asks Deckard: "Are you for real?". Was this meant to be significant?
Is it legal for a supermarket to refuse to sell an adult beer if an adult with them doesn’t have their ID?
Do dragons smell of lilacs?
Is encryption still applied if you ignore the SSL certificate warning for self signed?
Practical example in using (homotopy) type theory
Searching multiple index with different fields
Treat child as field of parent in elastic search queryElastic Search - get records by starting character of a fieldElasticsearch global search different filter on multiple indexessubtract two fields in elastic search indexElasticSearch NEST Search Multiple Types & All FieldsElastic Search Adding a Script Field vs Adding a new Index fieldBest database for multiple-column indexes?How to get elasticsearch suggestions working on multiple fields from multiple types?How do I make a field have varying type in Elastic SearchElasticsearch - Can't search using suggestion field (“is not a completion suggest field”)
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
We are using ES and getting response properly for 1 index with search fields. I need suggestions of following :
Problem : I have different objects like contact, account have records which is searchable by in account (name field will be used to search) where in contact (Email, phone field will be used to search)
- Should I use 1 index and keep contact and account in same index with different type (account, contact) to separate the records.
- Should I create 2 index, 1 for account and another for contact.
Whatever is preferrable, please give me search tips. How it will search based on different fields.
Thank you so much !
elasticsearch
add a comment |
We are using ES and getting response properly for 1 index with search fields. I need suggestions of following :
Problem : I have different objects like contact, account have records which is searchable by in account (name field will be used to search) where in contact (Email, phone field will be used to search)
- Should I use 1 index and keep contact and account in same index with different type (account, contact) to separate the records.
- Should I create 2 index, 1 for account and another for contact.
Whatever is preferrable, please give me search tips. How it will search based on different fields.
Thank you so much !
elasticsearch
add a comment |
We are using ES and getting response properly for 1 index with search fields. I need suggestions of following :
Problem : I have different objects like contact, account have records which is searchable by in account (name field will be used to search) where in contact (Email, phone field will be used to search)
- Should I use 1 index and keep contact and account in same index with different type (account, contact) to separate the records.
- Should I create 2 index, 1 for account and another for contact.
Whatever is preferrable, please give me search tips. How it will search based on different fields.
Thank you so much !
elasticsearch
We are using ES and getting response properly for 1 index with search fields. I need suggestions of following :
Problem : I have different objects like contact, account have records which is searchable by in account (name field will be used to search) where in contact (Email, phone field will be used to search)
- Should I use 1 index and keep contact and account in same index with different type (account, contact) to separate the records.
- Should I create 2 index, 1 for account and another for contact.
Whatever is preferrable, please give me search tips. How it will search based on different fields.
Thank you so much !
elasticsearch
elasticsearch
asked Mar 26 at 9:46
OpvOpv
2121 silver badge14 bronze badges
2121 silver badge14 bronze badges
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
Here are my answer that I found on official website.
It is preferable to have separate index for each types (Account, Contact) etc.
Use below kind of search json to search among all the indexes.
"index" : "contacts"
"query" : "match_all" :
"index" : "accounts"
"query" : "match_all" :
curl -H "Content-Type: application/x-ndjson" -XGET localhost:9200/_msearch --data-binary "@requests"; echo
Thanks
add a comment |
I think you should know your use case. Suppose There is lots of search queries are going to come which going to access both information like account and contact info, Then i would suggest to make one index. It will help you to perform complex queries like aggregation etc.
It will also help you to select multiple fields from account as well as contact info.
If query is going to totally isolated, Then you should go for different dedicated indices. You can simply mention multiple index name by comma separated check this
Example:
curl -XGET 'localhost:9200/account,contact/_search?pretty' -H 'application/json' -d'
"query":
"name":"foo"
'
add a comment |
In your case 1 account could have multiple contacts so better to have account and contacts in separate index.
Elasticsearch supports multi index search that can be utilize to execute search on multiple indexes.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55354038%2fsearching-multiple-index-with-different-fields%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Here are my answer that I found on official website.
It is preferable to have separate index for each types (Account, Contact) etc.
Use below kind of search json to search among all the indexes.
"index" : "contacts"
"query" : "match_all" :
"index" : "accounts"
"query" : "match_all" :
curl -H "Content-Type: application/x-ndjson" -XGET localhost:9200/_msearch --data-binary "@requests"; echo
Thanks
add a comment |
Here are my answer that I found on official website.
It is preferable to have separate index for each types (Account, Contact) etc.
Use below kind of search json to search among all the indexes.
"index" : "contacts"
"query" : "match_all" :
"index" : "accounts"
"query" : "match_all" :
curl -H "Content-Type: application/x-ndjson" -XGET localhost:9200/_msearch --data-binary "@requests"; echo
Thanks
add a comment |
Here are my answer that I found on official website.
It is preferable to have separate index for each types (Account, Contact) etc.
Use below kind of search json to search among all the indexes.
"index" : "contacts"
"query" : "match_all" :
"index" : "accounts"
"query" : "match_all" :
curl -H "Content-Type: application/x-ndjson" -XGET localhost:9200/_msearch --data-binary "@requests"; echo
Thanks
Here are my answer that I found on official website.
It is preferable to have separate index for each types (Account, Contact) etc.
Use below kind of search json to search among all the indexes.
"index" : "contacts"
"query" : "match_all" :
"index" : "accounts"
"query" : "match_all" :
curl -H "Content-Type: application/x-ndjson" -XGET localhost:9200/_msearch --data-binary "@requests"; echo
Thanks
answered Mar 28 at 4:18
OpvOpv
2121 silver badge14 bronze badges
2121 silver badge14 bronze badges
add a comment |
add a comment |
I think you should know your use case. Suppose There is lots of search queries are going to come which going to access both information like account and contact info, Then i would suggest to make one index. It will help you to perform complex queries like aggregation etc.
It will also help you to select multiple fields from account as well as contact info.
If query is going to totally isolated, Then you should go for different dedicated indices. You can simply mention multiple index name by comma separated check this
Example:
curl -XGET 'localhost:9200/account,contact/_search?pretty' -H 'application/json' -d'
"query":
"name":"foo"
'
add a comment |
I think you should know your use case. Suppose There is lots of search queries are going to come which going to access both information like account and contact info, Then i would suggest to make one index. It will help you to perform complex queries like aggregation etc.
It will also help you to select multiple fields from account as well as contact info.
If query is going to totally isolated, Then you should go for different dedicated indices. You can simply mention multiple index name by comma separated check this
Example:
curl -XGET 'localhost:9200/account,contact/_search?pretty' -H 'application/json' -d'
"query":
"name":"foo"
'
add a comment |
I think you should know your use case. Suppose There is lots of search queries are going to come which going to access both information like account and contact info, Then i would suggest to make one index. It will help you to perform complex queries like aggregation etc.
It will also help you to select multiple fields from account as well as contact info.
If query is going to totally isolated, Then you should go for different dedicated indices. You can simply mention multiple index name by comma separated check this
Example:
curl -XGET 'localhost:9200/account,contact/_search?pretty' -H 'application/json' -d'
"query":
"name":"foo"
'
I think you should know your use case. Suppose There is lots of search queries are going to come which going to access both information like account and contact info, Then i would suggest to make one index. It will help you to perform complex queries like aggregation etc.
It will also help you to select multiple fields from account as well as contact info.
If query is going to totally isolated, Then you should go for different dedicated indices. You can simply mention multiple index name by comma separated check this
Example:
curl -XGET 'localhost:9200/account,contact/_search?pretty' -H 'application/json' -d'
"query":
"name":"foo"
'
answered Mar 28 at 5:40
Ashish TiwariAshish Tiwari
7926 silver badges14 bronze badges
7926 silver badges14 bronze badges
add a comment |
add a comment |
In your case 1 account could have multiple contacts so better to have account and contacts in separate index.
Elasticsearch supports multi index search that can be utilize to execute search on multiple indexes.
add a comment |
In your case 1 account could have multiple contacts so better to have account and contacts in separate index.
Elasticsearch supports multi index search that can be utilize to execute search on multiple indexes.
add a comment |
In your case 1 account could have multiple contacts so better to have account and contacts in separate index.
Elasticsearch supports multi index search that can be utilize to execute search on multiple indexes.
In your case 1 account could have multiple contacts so better to have account and contacts in separate index.
Elasticsearch supports multi index search that can be utilize to execute search on multiple indexes.
answered Mar 28 at 5:49
Satyendra SharmaSatyendra Sharma
862 bronze badges
862 bronze badges
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55354038%2fsearching-multiple-index-with-different-fields%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown