search engine Zilverline 搜索 引擎


prepare envirement:
jdk 1.4.2      tomcat 5.0.28   

 

1. download software via:
 
2. deploy the software as a project in tomcat
   2.1  rename the software from zilverline-1.5.0.war to zilverline.wa    and   move it to the folder  %tomcat%/webapps
   2.2  restart tomcat and visit the search engine's interface via (http://localhost:8080/zilverline/search.htm)
   2.3  log in the system
         2.3.1   search string "change the passwords" in file %tomcat%/webapps/zilverline/WEB-INF/acegi-security.xml
                   then you will get the default account and password is:       admin/password
   2.4  create collection and index
         connection:   it means which files we should search with the keyword
         index:           the software will show refere links to match the keyword's search result according to the index
        2.4.1 after log in, we can click the link:     "Collections"
        2.4.2  click "Add Collection" and insert refere value to create the collection
        2.4.3  the search results will not have a url until we set the Collection's property
               log in --->  add collection   --->  click the collection we need to modify   ----> select the radio button
        2.4.4  click the button "Create Index" to create index
 
3.   some basic knowledge
     http://www.zilverline.org/zilverlineweb/space/faq
 
4.   about the schedule for update collection and index
     4.1  refere to the page   http://www.zilverline.org/zilverlineweb/space/scheduling
     4.2  the <property name="cronExpression"> 's setting: (about the schedule to update collecton and index)
           please refere to the link below     http://www.opensymphony.com/quartz/api/org/quartz/CronTrigger.html
     4.3 
setup schedule-context.xml to update the index with a brand new index
          (refer to source file org.zilverline.service.IndexServiceImpl)
                 <bean id="methodInvokingJobDetail"
     
         class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
                     <property name="targetObject"><ref bean="indexService"/></property>
       
              <property name="targetMethod"><value>reIndex</value></property>
                 </bean>   

     4.4  setup multiple schedules
            example

     search string "<Connector" in %tomcat%/conf/server.xml and add string URIEncoding="UTF-8"  in the tag as below:
     <Connector port="8080" maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" redirectPort="8443" acceptCount="100"
debug="0"
               connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="UTF-8" />

6.   enlarge the engine's search scope
      example:
       the engine doesn't search the key in the jsp files, so we need to update the setting in the preference----->  摘取器映像
    

7.    source code's online api document
      http://www.zilverline.org/build/apidocs/


8.    refere configuration files's usage
   please search string "getConfigLocations" in every source files
   8.1   we can grep all the source files
   8.2   we can search in google or baidu like this keyword:
           getConfigLocations Zilverline acegi-security.xml

    8.3    then we can read the source code to learn some things which will help us

9.   some things not sure
     9.1  where does the engine store the collection and index and how to modify these config
           refer to collectionManager.xml's <collections>
     9.2  does the engine search in the sensitivity files in the project, such like the files in WEB-INF
           yes, we need further action to forbid this condition
     9.3  why some links in the search result can't be click?
          
     9.4  does the engine surpport the function that: search the pages in the other company's server via their projects' url?
         
     9.5  if a file had a string  "hello" then we search "he" but there are no results?!
          9.5.1  this problem maybe caused by this condition:   the collection and index havn't be updated before we search
          9.5.2  if we had updated the collection and index, but the problem still exist,
                   so it maybe refer to the search method in the core of the engine's search regular
     9.6  sometime we add some new files in the collection's folders, but after we updated the index, it just can't show the new files add? it just seem like update failed but not tips showed?!

10  attention:
    10.1 the search engine will ignore the link created by command 'ln', so we should use the
         real path to
create index!
    10.2  edit the config file: applicationContext.xml to setup the project's based-directory
              <bean id="abstractDao" class="org.zilverline.dao.xstream.AbstractXStreamDAOImpl" abstract="true">
                     <property name="baseDir">
                           <value>C:/Program Files/Apache Software Foundation/Tomcat 5.0/webapps/zilverline/WEB-INF/db</value>
                    </property>
             </bean>
    10.3  the engine would stop update the index once some search reqest was triggered during
           the engine updating the index incremently, but if update a brand new index, this
            condition would never happened.
   10.4  once the search engine can't start correctly because of the search engine complaint some default value had been setted, we should add the string below to the config file:  web.xml
          <context-param>
                <param-name>webAppRootKey</param-name>
                <param-value>app1.root</param-value>
        </context-param>

11  other search engine's introduction     
 
12. Exception's solution:
  1. 2009-01-05 10:58:53,905 [*IndexingThread] [ERROR] org.zilverline.core.AbstractCollection  Can't succesfully finish background indexing process
  2. org.zilverline.core.IndexException: Error indexing *. Possibly unable to remove old index
  3.         at org.zilverline.core.FileSystemCollection.index(FileSystemCollection.java:179)
  4.         at org.zilverline.core.AbstractCollection$1.run(AbstractCollection.java:509)
  5.         at java.lang.Thread.run(Thread.java:595)
  6. Caused by: java.io.IOException: Lock obtain timed out: Lock@/usr/local/tomcat/temp/lucene-ee1683f9af41386be10b6bc43b69c29e-write.lock
  7.         at org.apache.lucene.store.Lock.obtain(Lock.java:58)
  8.         at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:255)
  9.         at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:225)
  10.         at org.zilverline.core.FileSystemCollection.index(FileSystemCollection.java:142)
  11.         ... 2 more

   原因:              某個文件被鎖,所以在訪問時發生錯誤

   解決方法:         備分並刪除被鎖的文件       /usr/local/tomcat/temp/lucene-ee1683f9af41386be10b6bc43b69c29e-write 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值