• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Index file location

 
Ranch Hand
Posts: 643
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am getting

Cannot save index to 'index' directory, please delete it first



Where does lucene stores the index file.
I am unable to find index file location(I was successful for search), I have given the location "C:\Documents and Settings\upop>java org.apache.lucene.demo.IndexFiles D:\ss\db
_backup\lucene-2.4.1\src"

Second question ,

How lucene will search into the JSP pages if jsp pages are dependent on each other ,we may get Exception if the condition is not satisfied.

Can you help me in this case.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Lucene stores the index in the directory where you tell it to store it. Did you follow the instructions contained in the error message?

How lucene will search into the JSP pages if jsp pages are dependent on each other ,we may get Exception if the condition is not satisfied.


Do you mean "index" instead of "search"? It's important to keep those two aspects of Lucene usage apart.

Either your indexing code accesses JSP *files*, in which case there is no notion of dependencies (files do not depend on one another, at least not as far as Lucene is concerned), or it accesses HTML pages created by JSPs (in which case the file dependencies have been resolved at the server, and are irrelevant to the HTML that was generated).
 
chetan deol
Ranch Hand
Posts: 643
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I will explain the scenario in detail


If second JSP page is dependent on the first page and If in the search we get second jsp page address , and if we click on that JSP page then we may not get the expected result.

 
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

f second JSP page is dependent on the first page and If in the search we get second jsp page address , and if we click on that JSP page then we may not get the expected result.



Well then, is it a good idea to index JSP files - they usually contain java code, and generate content dynamically?
 
We noticed he had no friends. So we gave him this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic