我正在尝试根据另一个以JSON格式转储数据的应用程序的输出从弹性运行搜索。格式如下:
{
"currentRow": 100,
"fields": [
{ "name": "dDocName" }, { "name": "dDocTitle" }, { "name": "dDocType" }, { "name": "dSecurityGroup" },
{ "name": "dInDate" }, { "name": "xColor" }, { "name": "xPersonType" }, { "name": "xRegionDefinition" },
{ "name": "xLibraryGUID" }, { "name": "dDocLastModifiedDate" }, { "name": "xIdentityNum" },
{ "name": "xLonTriggeyu" }, { "name": "xIntField" }, { "name": "dRevClassID" }, { "name": "xFFTest" },
{ "name": "xWCWorkflowAssignment" }, { "name": "dDocClass" }, { "name": "xWebsiteObjectType" },
{ "name": "xCustomerCode" }, { "name": "xInvoiceNum" }, { "name": "AlternateFormat" }, { "name": "dDocAuthor" },
{ "name": "xfruit" }, { "name": "xSupplierNum" }, { "name": "xEBSParam" }, { "name": "xTestTree" },
{ "name": "xVideoRenditions" }, { "name": "xStorageRule" }, { "name": "xstatecitymemo" },
{ "name": "xPOHeaderId" }, { "name": "xTREELOCATION" }, { "name": "xDamConversionType" },
{ "name": "xInvoiceAmount" }, { "name": "xDiscussionType" }, { "name": "dDocFunction" },
{ "name": "xModifiedBy" }, { "name": "xCustomerTaxPayerId" }, { "name": "dOutDate" },
{ "name": "xIPMSYS_BATCH_SEQ" }, { "name": "dDocLastModifier" }, { "name": "dFormat" },
{ "name": "dRendition2" }, { "name": "dRendition1" }, { "name": "xCustomerName" }, { "name": "xHideThread" },
{ "name": "xGender" }, { "name": "xWCTags" }, { "name": "xExtURL" }, { "name": "xTestFolder1" },
{ "name": "xPackagedConversions" }, { "name": "xClbraRoleList" }, { "name": "xFFTest1" },
{ "name": "xInvoiceCurrency" }, { "name": "dDocCreatedDate" }, { "name": "xWebsites" },
{ "name": "xTestFiddler" }, { "name": "xDontShowInListsForWebsites" }, { "name": "dDocAccount" },
{ "name": "URL" }, { "name": "xClbraUserList" }, { "name": "xAvaya_Region" }, { "name": "dCreateDate" },
{ "name": "dID" }, { "name": "xSri2" }, { "name": "dExtension" }, { "name": "xSri1" },
{ "name": "xfwm_cat_Mercados" }, { "name": "dWebExtension" }, { "name": "xcateg1" }, { "name": "xChecksum" },
{ "name": "xPONum" }, { "name": "dDocCreator" }, { "name": "VaultFileSize" }, { "name": "dRevLabel" },
{ "name": "xFirstName" }, { "name": "xCMUTest" }, { "name": "xDiscussionCount" }, { "name": "xClbraAliasList" },
{ "name": "xPartitionId" }, { "name": "dGif" }, { "name": "xIPMSYS_APP_ID" }, { "name": "dFullTextFormat" },
{ "name": "xTest1" }, { "name": "xFamilyName" }, { "name": "xInvoice" }, { "name": "xInvoiceDate" },
{ "name": "dRevisionID" }, { "name": "xWebsiteSection" }, { "name": "xWCWorkflowApproverUserList" },
{ "name": "WebFileSize" }, { "name": "xComments" }, { "name": "xWebFlag" }, { "name": "xNewtest" },
{ "name": "xOptionListIssue" }, { "name": "xtest" }, { "name": "xIPMSYS_BATCH_ID1" }, { "name": "xIdcProfile" },
{ "name": "dOriginalName" }, { "name": "dDocOwner" }, { "name": "dPublishType" }, { "name": "otsFormat" },
{ "name": "otsCharset" }, { "name": "otsLanguage" }, { "name": "SCORE" }, { "name": "srfDocSnippet" }
],
"rows": [
["WCCPS7_024401", "test1", "EBSAttachment", "AOK-Public", "5/3/167:18AM", "", "", "IDCNULL", "", "5/3/167:19AM", "", "", "0", "24401", "", "", "", "", "", "", "", "wccuser", "", "", "", "0", "", "DispByContentId", "", "", "", "", "", "N/A", "", "", "", "", "", "wccuser", "Application/unknown", "", "", "", "", "", "", "", "", "", "", "", "", "5/3/167:19AM", "", "", "", "", "/cs/groups/aok-public/documents/ebsattachment/czdf/mdi0/~edisp/wccps7_024401", "", "", "5/3/167:19AM", "24801", "", "", "", "", "", "", "2cd4124073fed81c624af0101ba28bda16db650fee35cbc8fd629904dead1b09/SHA-256", "", "wccuser", "377", "1", "", "", "0", "", "", "archiv.gif", "", "", "", "", "", "", "1", "", "", "377", "", "", "", "", "", "0", "EBSProfile", "UntitledDocument", "wccuser", "", "", "", "", "3", ""],
["WCCPS7_024202", "DLEASE_RAW_response", "Document", "AOK-Public", "4/19/1611:11AM", "", "", "IDCNULL", "", "4/19/1611:11AM", "", "", "0", "24202", "", "", "", "", "", "", "", "weblogic", "", "", "", "0", "", "DispByContentId", "", "", "", "", "", "N/A", "", "", "", "", "", "weblogic", "text/plain", "", "", "", "", "", "", "", "", "", "", "", "", "4/19/1611:11AM", "", "", "", "", "/cs/groups/aok-public/documents/document/czdf/mdi0/~edisp/wccps7_024202.txt", "", "", "4/19/1611:11AM", "24402", "", "txt", "", "", "txt", "", "2e2a98a3af833032d4f2b5ec3a8c62b80edeb13ac417d472744c713e4cae27e5/SHA-256", "", "weblogic", "594", "1", "", "", "0", "", "", "ucm_document.png", "", "txt", "", "", "", "", "1", "", "", "594", "", "", "", "", "", "0", "", "DLEASE_RAW_response.txt", "weblogic", "", "", "", "", "3", ""]
// ...
已将此数据转储到json文件并将其上传到弹性文件。
我无法创建一个查询,根据每个字段的特定值列出项目/数据。
例如,我应该如何设置一个查询,该查询将返回dDocAuthor
为weblogic
的所有项目?
答案 0 :(得分:0)
首先,应该使用正确的json格式来索引到elasticsearch。对于索引,请使用elasticsearch文档中提供的BULK API。
然后您可以根据您的要求进行查询。