amazon-cloudsearch

Query for field existence in CloudSearch

人盡茶涼 提交于 2019-12-24 05:48:14
问题 Suppose I have an optional field called 'xyz' in the list of documents I've indexed in CloudSearch. How do I query CloudSearch so that it returns only those documents that contain 'xyz'? If I know up front, that it's a positive integer, I can probably do something like this to get the required list: q=xyz:[0,}&q.parser=structured But how do I do it if 'xyz' stores some other type like a string or a list of ints/strings etc.,? BTW, I've used Solr before, and there, I could simply do q=xyz:* to

Boto CloudSearch on GAE: TypeError: request() got an unexpected keyword argument 'config'

社会主义新天地 提交于 2019-12-24 00:54:14
问题 I'm using Boto 2.8 on GAE to search and index docs to AWS CloudSearch. When I try to index a document I get the following error: TypeError: request() got an unexpected keyword argument 'config' Surfing the web suggests there is a version compatibility issue with the request library. The issue seems to come from lines 189-199 of boto/cloudsearch/document.py request_config = { 'pool_connections': 20, 'keep_alive': True, 'max_retries': 5, 'pool_maxsize': 50 } r = requests.post(url, data=sdf,

How to implement multiselectable facet checkboxes with amazon cloudsearch?

自作多情 提交于 2019-12-23 01:46:33
问题 I am using amazon cloud search in my website.My website is an e learning portal where i have content of types videos,questions,courses etc.Each type of content having different levels like 1st grade,2nd grade,3rd grade etc of different curriculum like cbse,state board etc and of different educators like xyz,abc,pqr etc.I am filtering my content based on facet and also filtering facet based on facet selection.My filter is working like amazon cloudsearch console.In console we can not do

How do I connect to an existing CloudSearch domain in boto?

那年仲夏 提交于 2019-12-22 05:14:45
问题 I'm just starting to work with boto to connect to Amazon CloudSearch. I got the examples working, but I can't find any examples of connecting to an existing domain, all the examples create a new domain. Poking around, I found get_domain, but that fails if I call it on the connection object. >>> conn.get_domain('foo') Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'Layer2' object has no attribute 'get_domain' Any suggestions as to how I can connect to an

Amazon CloudSearch creates Null ID from DynamoDB

江枫思渺然 提交于 2019-12-21 20:52:37
问题 I'm trying to get started with Amazon CloudSearch. I have my data in a DynamoDB Table that I want to search. I was able to set up the cloud search domain and it pulled the fields from the table and let me set them, etc. However I went to upload the data and I'm having some issues. I told it the DynamoDB table to pull from and it did it's data pull and told me it found the items and I pressed the import but it's giving me errors about needing at least one field and needing to have a non-null

AWS CloudSearch: different documents in 1 domain?

爷,独闯天下 提交于 2019-12-20 10:41:18
问题 I'm interested in using AWS Cloud Search for my web app. I have 3 different document types that I want to make searchable (users - articles - images). What is the best way to do this with Cloud Search? Do I need to create 3 different AWS search domains? And does this mean i need to pay for at least 3 search instances? Or can I put all of them in 1 domain / instance and use something like indexes or types (to use elastic search terminology)? Thanks! 回答1: You can try this: Add a "searchable

Amazon Cloudsearch : Filter if exists

走远了吗. 提交于 2019-12-19 05:58:52
问题 I have an amazon cloudsearch domain. The aim is to filter if the field 'language' exists. Not all objects have a language, and I want to have the ones which do have a language filtered, but the ones that do not have any language to also be returned. I want to filter with ( or language:'en' language:null ) However null cannot be passed within a string. Is this possible? If so how would it be done. 回答1: I looked elsewhere aswell, it seems : The simplest way to do that, is to set a default value

How to do wildcard search using structured prefix operator with AWS CloudSearch

☆樱花仙子☆ 提交于 2019-12-12 22:16:30
问题 I've currently migrating to the 2013 Cloudsearch API (from the 2011 API). Previously, I had been using a wildcard prefix with my searches, like this: bq=(and 'first secon*') My queries sometimes include facet options, which is why I use the boolean query syntax and not the simple version. I've created a new cloudsearch instance using the 2013 engine and indexed it. The bq parameter is gone now, so I have to use the q parameter with the q.parser=structured parameter to get the same

Select distinct Cloudsearch AWS

有些话、适合烂在心里 提交于 2019-12-12 03:25:49
问题 Now I'm doing this request on CloudSearch : aws cloudsearchdomain --endpoint-url myUrl search --search-query France --query-options "{'fields':['country']}" --return name I want to get only distinct names but i get names with id. Is there a way to do that ? 回答1: For this example array : country | city | company_name | company_id | product_name | product_id US | NY | C1N | C1id | P1N | P1id US | NY | C1N | C1id | P2N | P2id US | NY | C2N | C2id | P1N | P1id I want to get all distinct company

AWS CloudSearch Upload JSON: Value tag cannot be array or object

北战南征 提交于 2019-12-11 06:59:20
问题 I Am running a lambda function (NodeJS) to upload some documents to AWS Cloud Search. I keep getting the following error. { "errorMessage": "{ [\"The value of tags cannot be a JSON array or object\"] }", "errorType": "DocumentServiceException", "stackTrace": [ "Object.extractError (/var/task/node_modules/aws-sdk/lib/protocol/json.js:48:27)", "Request.extractError (/var/task/node_modules/aws-sdk/lib/protocol/rest_json.js:37:8)", "Request.callListeners (/var/task/node_modules/aws-sdk/lib