You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Van Nguyen <vn...@ur.com> on 2006/06/13 00:59:16 UTC
updating index - web application
I've been playing around with Lucene for a while now. I'm pretty
comfortable with creating an index and searching against it. Up until
now, I've been using the LuceneIndexAccessor package contributed by Maik
Schreiber and that's working well for me.
Now the next obstacle is to figure out what the best implementation is
for updating the index. Should the updating of the index be handled via
a web service, a schedule windows task, etc (the web app will be running
on WebSphere Application Server on Windows 2003)? I have a timer
service that was written for another application that sends out emails
at regular scheduled intervals. Should I apply the same methodology to
updating the index (I actually tried that... did as I wanted - but
synchronizing the LuceneIndexAccessor proved to be a challenge). Any
input would be appreciated.
Thanks
Re: Use one or more indexes?
Posted by wu fox <fo...@gmail.com>.
哥们:
这要看你打算如何组织你的索引了.多索引的情况下必须要考虑一个合并的问题
,比如你要查找全文和标题就必须涉及到两个索引的搜索结果,那么你按照什么来合并呢?还有,自己合并结果是一个愚蠢的想法,你必须让lucene替你合并,
这是由于算法的速度决定的.这是多索引最主要的问题,如何去合并各个分区的结果.如果是单分区
,当然你可以把所有相关的东西都放在一个document里,搜索是没有问题的,难度在于"更新",lucene是没有更新操作的,他会先删除doc,再重现添加,如果doc里比较复杂的话你就需要重新去做关于这个doc的索引,如果还涉及到抽取全文,
这个过程需要的时间可就大发了.比如用户修改了一个标题
,要么让用户等上半天等你重新做完索引,注意这时候索引是加锁的,第二个人如果做更新的话只能排队,如果更新频繁的话你甚至还需要队列机制;要么你给用户返回一个结果:系统正在做,然后用户发现更新结果不能马上出来,
他就要骂娘.总之你要根据你的实际情况来决定哪一种方案,因为你提供的信息太少,我只能给你指出两种方案的最大缺点供你参考
Re: Use one or more indexes?
Posted by yueyu lin <po...@gmail.com>.
What's search engine?
There's an inverted index table.
Key----> Document
Only key, the document will be anything you like.
You can use different key for different document.
Lucene is not relational database, no column. Different document may have
different fields.
Another thing you must know is that Lucene is a tool kit, you have to use it
to implment your application.
You can never user Lucene to finish any task without any your own efforts.
On 6/14/06, Liao Xuefeng <as...@gmail.com> wrote:
>
> hi, I'm new to lucene.
>
> Now I want to add full-text search for my website to search articles,
> images
> and bbs topics. I'm not sure to use only one index to search all types of
> these, or create 3 indexes for each of type.
>
> If I use only one index, do I have to add a 'type' field to identify
> document type? and how to filter the specified type?
> If I use 3 indexes, is there more memory & cpu time cost?
>
> Thanks in advance, for any help & suggestions.
>
>
> Best regards,
> Xuefeng
>
> Email: askxuefeng@gmail.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
--
--
Yueyu Lin
Use one or more indexes?
Posted by Liao Xuefeng <as...@gmail.com>.
hi, I'm new to lucene.
Now I want to add full-text search for my website to search articles, images
and bbs topics. I'm not sure to use only one index to search all types of
these, or create 3 indexes for each of type.
If I use only one index, do I have to add a 'type' field to identify
document type? and how to filter the specified type?
If I use 3 indexes, is there more memory & cpu time cost?
Thanks in advance, for any help & suggestions.
Best regards,
Xuefeng
Email: askxuefeng@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: updating index - web application
Posted by Chris Lu <ch...@gmail.com>.
My approach, which I think is common, is to use Quartz sheduler.
Chris
-----------------------------
Instant Lucene Search on Any Databases/Applications
http://www.dbsight.net
On 6/12/06, Van Nguyen <vn...@ur.com> wrote:
> I've been playing around with Lucene for a while now. I'm pretty
> comfortable with creating an index and searching against it. Up until
> now, I've been using the LuceneIndexAccessor package contributed by Maik
> Schreiber and that's working well for me.
>
>
>
> Now the next obstacle is to figure out what the best implementation is
> for updating the index. Should the updating of the index be handled via
> a web service, a schedule windows task, etc (the web app will be running
> on WebSphere Application Server on Windows 2003)? I have a timer
> service that was written for another application that sends out emails
> at regular scheduled intervals. Should I apply the same methodology to
> updating the index (I actually tried that... did as I wanted - but
> synchronizing the LuceneIndexAccessor proved to be a challenge). Any
> input would be appreciated.
>
>
>
> Thanks
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org