安卓应用+SOLR[英] Android app + SOLR

本文是小编为大家收集整理的关于安卓应用+SOLR的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。

问题描述

我想使用solr来搜索我的Android应用程序.这是我能做的吗? 如果是这样,请把我指向一些代码样本吗? 谢谢

推荐答案

取决于. solr是一个相当沉重的服务器应用程序,它并不适合在Android设备上运行.

您将希望在某个地方的服务器上运行solr,并将您的Android应用程序通过HTTP连接到Solr.

但是,Solr不设计为公共HTTP应用程序(请参阅 solr security wiki页面),因此,它通常最好编写一个充当代理的小型Web服务,同时为您的Android应用程序提供简化的,量身定制的API.

本文地址:https://www.itbaoku.cn/post/102343.html

问题描述

I would like to use SOLR to do search on my android app. Is this something that I can do? If so could you please point me to some code samples out there? Thanks

推荐答案

Depends. Solr is a quite heavy server application, it's not really suited to run on an Android device.

You'll want to run Solr on a server somewhere and have your Android app connect to Solr via HTTP.

However, Solr is not designed to be used as a public HTTP application (see the Solr security wiki page), so it's generally best to write a small web service that acts as a proxy and at the same time offers a simplified, tailored API for your Android app.