Is it possible to do a regex search in Amazon keyspaces? - javascript

I am trying to implement seach functionality based on the title field of entries present in amazon keyspaces. I was trying to do a regex match on the title field but I am not to figure out how it could be done. Does amazon keyspace supports regex search? I am using the Datastax nodeJs driver for cassandra. Also I checked the documentation for amazon keyspace but could not find any useful information.
If anyone is familiar with this, please help me out.

No, as of 20230207, it is not possible to run a regex-based query on Amazon Keyspaces.

That functionality doesn't exist because Cassandra is designed for OLTP workloads where the access pattern is optimised for retrieving one record by filtering on a specific partition key.
Since you have a complex search use case, the general recommendation is to use search engines based on Lucene such as Elasticsearch or Apache Solr. Both of those are capable of performing complex searches over indexed Cassandra data. Cheers!

Related

NodeJS: Data persistence layer

We are building the messaging application in javascript using nodejs. As part of durability of the overall solution, we need to store text messages and media content outside ejabberd. To keep the text messages we used DynamoDB, DB as Service. But when we port-in the solution with different customers, customers are asking for different DBs for which they have licenses, like mysql, postgres, sql server, oracle, DB2, mongoDB etc...
Now my question is,
Does ORM/ODM is a good fit here for a loosely coupled persistency layer? If so, javascript supports ORM/ODM based solution
If ORM/ODM is not good fit, what are the alternatives
Just a thought, I looked at TypeORM, it does provide loosely coupled persistency layer to port-in with different back-end systems..., is this a feasible framework to take it forward.
Happy to hear experts inputs.
Regards
Venkata Madhu
TypeORM is a good candidate since it supports almost all the databases you mentioned (except DB2), I've worked with it and it's one of the best if you also want good typescript support.

How to use Amazon Elasticsearch to index dynamodb data?

I want to create a search engine, using javascript for the cllient side and Amazon ES for the backend. However, since i am just discovering the elasticsearch api, i am looking for a detailed explanation of how i can index my dynamodb entries in real-time and then building a customized search engine with some features like auto suggest, auto filling etc.
I can't find any tutorial on the web that explain the entire process.
Any help would be very appreciated.
Thanks.
This plugin can help with streaming the data from DynamoDB:
https://github.com/awslabs/logstash-input-dynamodb
The readme has some information, I'm not sure if that's the kind of detail you are after, but it's a good place to start.

Search tool in Meteor JS

Im quite a newbie when it comes to DBs and search so please bear with me. Im trying to implement a search function in Meteor app.
Ive checked through atmosphere and chanced upon these 4 options.
Mattodem easy search
Search Source
Elastic search package on Atmosphere (heard this is dated)
Elastic big data package on Atmosphere
My needs are for a simple search, able to handle larger data sets that may have data nesting. For example a task, may have comments or links etc. (Full text and more than regex query will be good)
I read that for easy search, even with some form of elastic or Mongodb application, seems to be application only for a single Mongo collection?For example what if I wanted to search across
Dinosaurs = new Meteor.Collection('dinosaurs'); and
Mammals = new Meteor.Collection('mammals');?
Appreciate any advice on the pros and cons on the 4 options above? 1 seems relative easy to implement but I,m not sure what it means by using elastic engine here. If I were to implement elastic, how do I go about doing it in Meteor? And would it differ from implementing a Elasticsearch HTTP API?
Similarly for Search Source, it supports Elastic too here. Honestly I have no clue on the differences.
This github project demonstrates how to use Meteor with ElasticSearch (not Mongo) for search applications
https://github.com/hharnisc/meteor-elasticsearch-demo/tree/master/elasticsearch-demo/packages/elastic-collection
it basically links a field to a session variable which triggers search on elastic. results are stored in a mongo collection that is pushed to the client through the Meteor mechanics. These are much smaller than the dataset and therefore are quick to update.
As far as searching accross collections, this is a typical problem of database schema definition. If you need to do joins, a mongodb is not the best solution. and relational DB like any SQL DB would be better suited, However, you should be looking into 'denormalization' of your data to see if you can create a structure that will work well for your use case.
This article explains what this means pretty well:
http://blog.mongodb.org/post/87892923503/6-rules-of-thumb-for-mongodb-schema-design-part-2
Good luck.

Accounts in serverside JavaScript (node.js)

I'm making an online game and I was wondering - how can users create accounts? Do I need a database, and if yes, which one? Also how do I get information from the users? I believe by using html tag, but how exactly? I'm not using PHP for the serverside, but node.js.
There are so many answers to this question it's tough to begin at one place.
I'll just suggest some technologies because that seems to be what you're looking for. Ultimately I recommend you research this area and make up your own mind on what you'd like to use.
You can use a database to store the user information. NoSQL is popular nowadays so I'll go for a MongoDB solution http://www.mongodb.org/
You don't exactly need to use HTML tags as there are template solutions written for node.js. I recommend jade https://github.com/visionmedia/jade
There are frameworks and middleware created to make all of this easier. Check it out here https://github.com/joyent/node/wiki/modules

Script to query the google API and return the search position of a url for multiple terms?

I would like to write a script that would access the google api pass a url and a list of search terms and then return the search position of each of those key terms for that url. Is this a simple enough task or even possible?
It's certainly possible. Your question is a bit too vague to provide a better answer than "Yes", though.
Do be aware that the position of a site in search results can vary by location and the Google site you use (e.g., if you're in the UK, using www.google.co.uk, I'd expect a UK website to rank higher than it would if you're in the US, using www.google.com).
The Google Custom Search API documentation is likely to be helpful to you. Sorry, this documentation is for site-specific searches (i.e. searching your own website), not Google in general.
You haven't actually said what language you intend to use, but there's Perl modules on CPAN which would make the task quite easy, for instance Google::Search.

Categories

Resources