整合Lucene Index和Amazon AWS [英] Integrating Lucene Index and Amazon AWS

查看:97
本文介绍了整合Lucene Index和Amazon AWS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个现有的lucene索引文件索引,并具有在其上执行搜索功能的java代码.

I have a an existing index of lucene index files and the java code to perform search functions on it.

我想做的是在服务器上执行相同的操作,因此应用程序的用户可以简单地传递一个查询,该查询将由java程序作为输入参数,并针对现有索引运行该查询以返回文档在其中发生.

What I would like to do is perform the same thing on a server so users of an app could simply pass a query that will be taken as an input parameter by the java program and run it against the existing index to return the document in which it occurs.

所有实现都已经在我的本地PC上进行了测试,但是我需要在Android应用中实现它.

All the implementation has been tested on my local pc,but what I need to do is implement it in an Android app.

到目前为止,我已经阅读并得出结论,将代码移植到AWS lambda中并使用S3存储文件并从lambda调用s3对象.

So far I have read around and concluded that porting the code in AWS lambda and using S3 to store the files and calling the s3 objects from lambda.

这是正确的方法吗?任何指向该方法或替代建议的资源也将受到赞赏.

Is this the right approach?Any resources that point to the this approach or alternative suggestions are also appreciated.

谢谢.

推荐答案

每当您的Android应用(通过我假设的AWS API Gateway)向AWS Lambda发送请求时,Lambda函数将必须将整个索引文件从S3下载到Lambda/tmp目录(其中Lambda具有 512MB限制)然后针对该索引文件执行搜索.这似乎效率极低,并且取决于索引文件的大​​小,它可能会表现非常糟糕,甚至可能无法容纳Lambda上可用的空间.

Every time your Android app sends a request to AWS Lambda (via AWS API Gateway I assume) the Lambda function will have to download the entire index file from S3 to the Lambda /tmp directory (where Lambda has a 512MB limit) and then perform a search against that index file. This seems extremely inefficient, and depending on how large your index file is, it might perform terribly or it might not even fit into the space you have available on Lambda.

我建议您调查 AWS Elasticsearch Service .这是一项基于Lucene的完全托管的搜索引擎服务,您应该能够直接从Android应用程序中查询.

I would suggest looking into the AWS Elasticsearch Service. This is a fully managed search engine service, based on Lucene, that you should be able to query directly from your Android application.

这篇关于整合Lucene Index和Amazon AWS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆