• <legend id='36He7'><style id='36He7'><dir id='36He7'><q id='36He7'></q></dir></style></legend>

      <small id='36He7'></small><noframes id='36He7'>

        <tfoot id='36He7'></tfoot>
      1. <i id='36He7'><tr id='36He7'><dt id='36He7'><q id='36He7'><span id='36He7'><b id='36He7'><form id='36He7'><ins id='36He7'></ins><ul id='36He7'></ul><sub id='36He7'></sub></form><legend id='36He7'></legend><bdo id='36He7'><pre id='36He7'><center id='36He7'></center></pre></bdo></b><th id='36He7'></th></span></q></dt></tr></i><div id='36He7'><tfoot id='36He7'></tfoot><dl id='36He7'><fieldset id='36He7'></fieldset></dl></div>
          <bdo id='36He7'></bdo><ul id='36He7'></ul>

        DynamoDB 查询 JSON 对象的子字段

        DynamoDB query on sub field of JSON Object(DynamoDB 查询 JSON 对象的子字段)
        • <i id='QUdth'><tr id='QUdth'><dt id='QUdth'><q id='QUdth'><span id='QUdth'><b id='QUdth'><form id='QUdth'><ins id='QUdth'></ins><ul id='QUdth'></ul><sub id='QUdth'></sub></form><legend id='QUdth'></legend><bdo id='QUdth'><pre id='QUdth'><center id='QUdth'></center></pre></bdo></b><th id='QUdth'></th></span></q></dt></tr></i><div id='QUdth'><tfoot id='QUdth'></tfoot><dl id='QUdth'><fieldset id='QUdth'></fieldset></dl></div>
                <tfoot id='QUdth'></tfoot>

                  <tbody id='QUdth'></tbody>
                • <bdo id='QUdth'></bdo><ul id='QUdth'></ul>

                  <small id='QUdth'></small><noframes id='QUdth'>

                  <legend id='QUdth'><style id='QUdth'><dir id='QUdth'><q id='QUdth'></q></dir></style></legend>
                • 本文介绍了DynamoDB 查询 JSON 对象的子字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  是否可以在dynamoDB表中搜索json对象的子字段?

                  Is it possible to search for a subfield of a json object in dynamoDB table?

                  我的桌子:

                  Item: "item name",  
                  Location: {...},  
                  ItemInformation :  
                  {  
                     ItemName: "itemName",  
                     ProductLine: {  
                        Brand: "Razer",  
                        ManufacturerSource: "Razer"  
                  }
                  

                  原来在这个表中ItemInformation是一个key,搜索一个对象,我们会为item信息构造json,然后用json字符串作为key进行查询.现在我们需要实现按该对象的子字段搜索,每次可以包含不同的字段,即isDigital: "true".

                  Originally in this table ItemInformation would be a key and searching for an object we would construct the json for the item information and then query with the json string as a key.. Now we need to implement searching by sub fields of that object, which can contain different fields each time, i.e. isDigital: "true".

                  我在问题中注意到:DynamoDB 高级扫描 - JAVA

                  答案似乎是否定的,我必须将字段分开.但我很好奇 PHP 库为什么以及如何在 dynamoDB 中查询 JSON 对象上的子字段.真的没有更好的解决方案,然后将列存储为单独的字段,然后在所有字段上添加索引?

                  The answer would seem to be no and I would have to separate out the fields. But I am curious about why and how the PHP library can query for sub fields on a JSON object in dynamoDB. Is there really no better solution then to store the column as separate fields and then add an index on all fields?

                  推荐答案

                  查看文档后,按照我最初的意图实现搜索字段是不可行的.问题是,虽然值是 JSON,但它们存储为字符串文字,所以我必须进行重构才能开始存储为 JSON 对象.此外,我无法添加列和索引,因为搜索可以对任意数量的字段进行操作,并且不同的项目可以有不同的字段,即项目可以有品牌、电池信息、名称.鉴于要求是这些子字段中的任何一个都应该是可搜索的,因此最好在 Cloud Search 或 ElasticSearch 中执行此操作,我可以在对象的列中对任意字段和值进行索引和搜索.

                  After looking through documentation it is not feasible to implement the search fields as I originally intended. The problem is that while the values are JSON they are stored as string literals so I have to do refactoring to start storing as JSON objects. Additionally I cannot add in columns and index because the search could operate on any number of fields and different items can have different fields, i.e. an Item can have Brand, BatteryInformation, Name. Given that the requirement is that any of these subfields should be searchable its better to do this in Cloud Search or ElasticSearch where I can index and search on arbitrary fields and values within a column of an object.

                  由于这是一个 DynamoDB 表,我将使用 CloudSearch,因为它提供了更简单的索引选项和数据集成.

                  Since this is a DynamoDB table, I am going to use CloudSearch since it offers easier indexing option and integration for data.

                  这篇关于DynamoDB 查询 JSON 对象的子字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Lucene Porter Stemmer not public(Lucene Porter Stemmer 未公开)
                  How to index pdf, ppt, xl files in lucene (java based or python or php any of these is fine)?(如何在 lucene 中索引 pdf、ppt、xl 文件(基于 java 或 python 或 php 中的任何一个都可以)?)
                  KeywordAnalyzer and LowerCaseFilter/LowerCaseTokenizer(KeywordAnalyzer 和 LowerCaseFilter/LowerCaseTokenizer)
                  How to search between dates (Hibernate Search)?(如何在日期之间搜索(休眠搜索)?)
                  How to get positions from a document term vector in Lucene?(如何从 Lucene 中的文档术语向量中获取位置?)
                  Java Lucene 4.5 how to search by case insensitive(Java Lucene 4.5如何按不区分大小写进行搜索)
                    <tbody id='gAFXm'></tbody>

                  • <i id='gAFXm'><tr id='gAFXm'><dt id='gAFXm'><q id='gAFXm'><span id='gAFXm'><b id='gAFXm'><form id='gAFXm'><ins id='gAFXm'></ins><ul id='gAFXm'></ul><sub id='gAFXm'></sub></form><legend id='gAFXm'></legend><bdo id='gAFXm'><pre id='gAFXm'><center id='gAFXm'></center></pre></bdo></b><th id='gAFXm'></th></span></q></dt></tr></i><div id='gAFXm'><tfoot id='gAFXm'></tfoot><dl id='gAFXm'><fieldset id='gAFXm'></fieldset></dl></div>

                        <tfoot id='gAFXm'></tfoot>
                        1. <legend id='gAFXm'><style id='gAFXm'><dir id='gAFXm'><q id='gAFXm'></q></dir></style></legend>
                            <bdo id='gAFXm'></bdo><ul id='gAFXm'></ul>
                          • <small id='gAFXm'></small><noframes id='gAFXm'>