FAQ
Hi,

I'm new using lucene.
I downloaded lucene 1.4.2 and added the 2 jar files to the
classpath.
Executing the demos as a bat file (Windows) is working fine, but
using lucene as a web 'application' is not working ...
Since I'm using netbeans, I startup the tomcat 5.0.28 with following
statements in the conf/Catalina/localhost/lucene.xml:
<Context path="/lucene" docBase="E:/Java/lucene-1.4.2"
debug="0" privileged="true">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="localhost_admin_log." suffix=".txt"
timestamp="true"/>
</Context>
where the 'docBase' is the main-path to the lucene-dirs.
Then i call the 'Search.html' in the src/demo dir, modified because
of the path:
action=http://localhost:8080/lucene/src/demo/Search.jhtml
After entering a search argument (ie Java) I get the contents of the
jhtml file,
after changing the 'queryString' by 'java', I get following error
message:
"The requested resource (/lucene/src/demo/servletPath) is
not available"

I'm sure that I did something wrong, but where ???
TIA
Willy



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Search Discussions

  • Daniel Naber at Oct 28, 2004 at 6:21 pm

    On Thursday 28 October 2004 15:01, Willy De Waele wrote:

    Executing the demos as a bat file (Windows) is working fine, but
    using lucene as a web 'application' is not working ...
    I think that Search.jhtml is totally outdated, please try src/jsp instead.

    Regards
    Daniel

    --
    http://www.danielnaber.de

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: [email protected]
    For additional commands, e-mail: [email protected]
  • Willy De Waele at Oct 29, 2004 at 4:12 pm
    First at all, thanks for you answer.
    Now I get some results with the jsp's, but the url's in de result is
    not clickeable ...
    Is this normal? (should I modify the template?)

    TIA & Regards
    Willy

    -----Original Message-----
    From: Daniel Naber
    Sent: donderdag 28 oktober 2004 20:21
    To: Lucene Users List
    Subject: Re: Search.jhtml ?

    On Thursday 28 October 2004 15:01, Willy De Waele wrote:

    Executing the demos as a bat file (Windows) is working fine,
    but using lucene as a web 'application' is not working ...
    I think that Search.jhtml is totally outdated, please try src/jsp instead.

    Regards
    Daniel

    --
    http://www.danielnaber.de



    ---------------------------------------------------------------------
    To unsubscribe, e-mail: [email protected]
    For additional commands, e-mail: [email protected]
  • Daniel Naber at Oct 29, 2004 at 5:21 pm

    On Friday 29 October 2004 18:12, Willy De Waele wrote:

    Now I get some results with the jsp's, but the url's in de
    result is not clickeable ...
    Is this normal? (should I modify the template?)
    The template expects fields "title" and "url" in the index (and stored), if
    these are available there should be one link per match you can click on.

    Regards
    Daniel

    --
    http://www.danielnaber.de

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: [email protected]
    For additional commands, e-mail: [email protected]
  • Erik Hatcher at Oct 29, 2004 at 8:22 pm

    On Oct 29, 2004, at 12:12 PM, Willy De Waele wrote:
    First at all, thanks for you answer.
    Now I get some results with the jsp's, but the url's in de result is
    not clickeable ...
    Is this normal? (should I modify the template?)
    It's a known issue that the Lucene web demo is quite shabby.

    I created detailed instructions for running it as an appendix to Lucene
    in Action. I'm pasting the relevant sections below:


    Running the web application demo The web demo is slightly involved to
    set up and run properly.
    You need a web container; our instructions are for Tomcat 5. The
    docs/demo.html documentation provides detailed instructions for setting
    up and running the web application, but you can also follow the steps
    provided here. The index used by the web application differs slightly
    from that in the command-line demo. First, it restricts itself to
    indexing only .html, .htm, and .txt files. Each file it processes
    (including .txt files) is parsed using a custom rudimentary HTML
    parser. To build the index initially, execute IndexHTML:

    java -cp lucene-1.4.2.jar;lucene-demos-1.4.2.jar
    org.apache.lucene.demo.IndexHTML -create -index webindex docs

    ...
    adding docs/resources.html
    adding docs/systemproperties.html
    adding docs/whoweare.html
    Optimizing index... 7220 total milliseconds

    The -index webindex switch sets the location of the index directory. In
    a moment, you’ll need the full path to this directory to configure the
    web application. The final docs argument to IndexHTML is the directory
    tree to index. The –create switch creates an index from scratch. Remove
    this switch to update the index with files that have been added or
    changed since the last time the index was built. Next, deploy
    luceneweb.war (from the root directory of the extracted distribution)
    into CATALINA_HOME/webapps. Start Tomcat, wait for the container to
    complete the startup routine, and then edit
    CATALINA_HOME/webapps/luceneweb/configuration.jsp using a text editor
    (Tomcat should have expanded the .war file into a luceneweb directory
    automatically). Change the value of indexLocation appropriately, as in
    this example, specifying the absolute path to the index you built with
    IndexHTML:

    String indexLocation =
    "/dev/LuceneInAction/install/lucene-1.4.1/webindex";

    Now you’re ready to try the web application. Visit
    http://localhost:8080/luceneweb in your web browser, and you should see
    “Welcome to the Lucene Template application...” (you can also change
    the header and footer text in configuration.jsp). If all is well with
    your configuration, searching for Lucene-specific words such as
    "QueryParser AND Analyzer" should list valid results based on Lucene’s
    documentation. You may try to click on one of the search results links
    and receive an error. IndexHTML indexes a url field, which in this case
    is a relative path of docs/.... To make the result links work properly,
    copy the docs directory from the Lucene distribution to
    CATALINA_HOME/webapps/luceneweb. Yes, these steps are a bit more
    manual than they should be. Rest assured that improvements to Lucene’s
    example applications are on our to-do list as soon as we’re finished
    writing this book!

    (sorry about the formatting of the above - it was pasted straight from
    a PDF)

    Erik

    TIA & Regards
    Willy

    -----Original Message-----
    From: Daniel Naber
    Sent: donderdag 28 oktober 2004 20:21
    To: Lucene Users List
    Subject: Re: Search.jhtml ?

    On Thursday 28 October 2004 15:01, Willy De Waele wrote:

    Executing the demos as a bat file (Windows) is working fine,
    but using lucene as a web 'application' is not working ...
    I think that Search.jhtml is totally outdated, please try src/jsp
    instead.

    Regards
    Daniel

    --
    http://www.danielnaber.de



    ---------------------------------------------------------------------
    To unsubscribe, e-mail: [email protected]
    For additional commands, e-mail: [email protected]

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: [email protected]
    For additional commands, e-mail: [email protected]
  • Willy De Waele at Oct 30, 2004 at 1:08 pm
    Indeed, when I follow the procedure it is working fine ...
    I created an index with following statement:
    java org.apache.lucene.demo.IndexHTML -create
    "E:/Java/lucene-1.4.2/docs"
    default index-dir: index
    all references absolute
    Why can't I search an index of files somewhere on the harddisk, in
    other words why
    should the 'docs' folder in de webapps/luceneweb folder ?

    Thnx
    Willy

    -----Original Message-----
    From: Erik Hatcher
    Sent: vrijdag 29 oktober 2004 22:22
    To: Lucene Users List
    Subject: Re: Search.jhtml ?

    On Oct 29, 2004, at 12:12 PM, Willy De Waele wrote:

    First at all, thanks for you answer.
    Now I get some results with the jsp's, but the url's in de result is
    not clickeable ...
    Is this normal? (should I modify the template?)
    It's a known issue that the Lucene web demo is quite shabby.

    I created detailed instructions for running it as an appendix to Lucene
    in Action. I'm pasting the relevant sections below:


    Running the web application demo The web demo is slightly involved to
    set up and run properly.
    You need a web container; our instructions are for Tomcat 5. The
    docs/demo.html documentation provides detailed instructions for setting
    up and running the web application, but you can also follow the steps
    provided here. The index used by the web application differs slightly
    from that in the command-line demo. First, it restricts itself to
    indexing only .html, .htm, and .txt files. Each file it processes
    (including .txt files) is parsed using a custom rudimentary HTML
    parser. To build the index initially, execute IndexHTML:

    java -cp lucene-1.4.2.jar;lucene-demos-1.4.2.jar
    org.apache.lucene.demo.IndexHTML -create -index webindex docs

    ...
    adding docs/resources.html
    adding docs/systemproperties.html
    adding docs/whoweare.html
    Optimizing index... 7220 total milliseconds

    The -index webindex switch sets the location of the index directory. In
    a moment, you’ll need the full path to this directory to configure the
    web application. The final docs argument to IndexHTML is the directory
    tree to index. The –create switch creates an index from scratch. Remove
    this switch to update the index with files that have been added or
    changed since the last time the index was built. Next, deploy
    luceneweb.war (from the root directory of the extracted distribution)
    into CATALINA_HOME/webapps. Start Tomcat, wait for the container to
    complete the startup routine, and then edit
    CATALINA_HOME/webapps/luceneweb/configuration.jsp using a text editor
    (Tomcat should have expanded the .war file into a luceneweb directory
    automatically). Change the value of indexLocation appropriately, as in
    this example, specifying the absolute path to the index you built with
    IndexHTML:

    String indexLocation =
    "/dev/LuceneInAction/install/lucene-1.4.1/webindex";

    Now you’re ready to try the web application. Visit
    http://localhost:8080/luceneweb in your web browser, and you should see
    “Welcome to the Lucene Template application...” (you can also change
    the header and footer text in configuration.jsp). If all is well with
    your configuration, searching for Lucene-specific words such as
    "QueryParser AND Analyzer" should list valid results based on Lucene’s
    documentation. You may try to click on one of the search results links
    and receive an error. IndexHTML indexes a url field, which in this case
    is a relative path of docs/.... To make the result links work properly,
    copy the docs directory from the Lucene distribution to
    CATALINA_HOME/webapps/luceneweb. Yes, these steps are a bit more
    manual than they should be. Rest assured that improvements to Lucene’s
    example applications are on our to-do list as soon as we’re finished
    writing this book!

    (sorry about the formatting of the above - it was pasted straight from
    a PDF)

    Erik

    TIA & Regards
    Willy

    -----Original Message-----
    From: Daniel Naber
    Sent: donderdag 28 oktober 2004 20:21
    To: Lucene Users List
    Subject: Re: Search.jhtml ?

    On Thursday 28 October 2004 15:01, Willy De Waele wrote:

    Executing the demos as a bat file (Windows) is working fine,
    but using lucene as a web 'application' is not working ...
    I think that Search.jhtml is totally outdated, please try src/jsp
    instead.

    Regards
    Daniel

    --
    http://www.danielnaber.de



    ---------------------------------------------------------------------
    To unsubscribe, e-mail: [email protected]
    For additional commands, e-mail: [email protected]



    ---------------------------------------------------------------------
    To unsubscribe, e-mail: [email protected]
    For additional commands, e-mail: [email protected]
  • Erik Hatcher at Oct 31, 2004 at 8:54 am

    Begin forwarded message:

    From: Erik Hatcher <[email protected]>
    Date: October 31, 2004 3:53:39 AM EST
    To: <[email protected]>
    Subject: Re: Search.jhtml ?
    On Oct 30, 2004, at 9:07 AM, Willy De Waele wrote:
    Indeed, when I follow the procedure it is working fine ...
    I created an index with following statement:
    java org.apache.lucene.demo.IndexHTML -create
    "E:/Java/lucene-1.4.2/docs"
    default index-dir: index
    all references absolute
    Why can't I search an index of files somewhere on the harddisk, in
    other words why
    should the 'docs' folder in de webapps/luceneweb folder ?
    That's just what makes the demo work. Again, the demo application is
    merely that (and relatively weakly done, as you can tell). Feel free
    to borrow parts of it or adapt it for other purposes than its basic
    purpose of showing how to index and search.

    I have had strong intentions to improve the Lucene demo application.
    The Lucene book is now done (final typesetting corrections are now
    being made), and I've got a few more speaking commitments (Reston and
    Denver NFJS as well as ApacheCon). I plan on taking a bit of a
    breather after that in November, and then in December I plan on ramping
    up my involvement with the Lucene community, and improving the demo
    application is going to be part of those efforts.

    If you have improvements to contribute or suggest, send them our way!
    :)

    Erik
    -----Original Message-----
    From: Erik Hatcher
    Sent: vrijdag 29 oktober 2004 22:22
    To: Lucene Users List
    Subject: Re: Search.jhtml ?

    On Oct 29, 2004, at 12:12 PM, Willy De Waele wrote:

    First at all, thanks for you answer.
    Now I get some results with the jsp's, but the url's in de result is
    not clickeable ...
    Is this normal? (should I modify the template?)
    It's a known issue that the Lucene web demo is quite shabby.

    I created detailed instructions for running it as an appendix to
    Lucene
    in Action. I'm pasting the relevant sections below:


    Running the web application demo The web demo is slightly involved to
    set up and run properly.
    You need a web container; our instructions are for Tomcat 5. The
    docs/demo.html documentation provides detailed instructions for
    setting
    up and running the web application, but you can also follow the steps
    provided here. The index used by the web application differs slightly
    from that in the command-line demo. First, it restricts itself to
    indexing only .html, .htm, and .txt files. Each file it processes
    (including .txt files) is parsed using a custom rudimentary HTML
    parser. To build the index initially, execute IndexHTML:

    java -cp lucene-1.4.2.jar;lucene-demos-1.4.2.jar
    org.apache.lucene.demo.IndexHTML -create -index webindex docs

    ...
    adding docs/resources.html
    adding docs/systemproperties.html
    adding docs/whoweare.html
    Optimizing index... 7220 total milliseconds

    The -index webindex switch sets the location of the index directory.
    In
    a moment, you’ll need the full path to this directory to configure the
    web application. The final docs argument to IndexHTML is the directory
    tree to index. The –create switch creates an index from scratch.
    Remove
    this switch to update the index with files that have been added or
    changed since the last time the index was built. Next, deploy
    luceneweb.war (from the root directory of the extracted distribution)
    into CATALINA_HOME/webapps. Start Tomcat, wait for the container to
    complete the startup routine, and then edit
    CATALINA_HOME/webapps/luceneweb/configuration.jsp using a text editor
    (Tomcat should have expanded the .war file into a luceneweb directory
    automatically). Change the value of indexLocation appropriately, as in
    this example, specifying the absolute path to the index you built with
    IndexHTML:

    String indexLocation =
    "/dev/LuceneInAction/install/lucene-1.4.1/webindex";

    Now you’re ready to try the web application. Visit
    http://localhost:8080/luceneweb in your web browser, and you should
    see
    “Welcome to the Lucene Template application...” (you can also change
    the header and footer text in configuration.jsp). If all is well with
    your configuration, searching for Lucene-specific words such as
    "QueryParser AND Analyzer" should list valid results based on Lucene’s
    documentation. You may try to click on one of the search results
    links
    and receive an error. IndexHTML indexes a url field, which in this
    case
    is a relative path of docs/.... To make the result links work
    properly,
    copy the docs directory from the Lucene distribution to
    CATALINA_HOME/webapps/luceneweb. Yes, these steps are a bit more
    manual than they should be. Rest assured that improvements to Lucene’s
    example applications are on our to-do list as soon as we’re finished
    writing this book!

    (sorry about the formatting of the above - it was pasted straight from
    a PDF)

    Erik

    TIA & Regards
    Willy

    -----Original Message-----
    From: Daniel Naber
    Sent: donderdag 28 oktober 2004 20:21
    To: Lucene Users List
    Subject: Re: Search.jhtml ?

    On Thursday 28 October 2004 15:01, Willy De Waele wrote:

    Executing the demos as a bat file (Windows) is working fine,
    but using lucene as a web 'application' is not working ...
    I think that Search.jhtml is totally outdated, please try src/jsp
    instead.

    Regards
    Daniel

    --
    http://www.danielnaber.de



    ---------------------------------------------------------------------
    To unsubscribe, e-mail: [email protected]
    For additional commands, e-mail: [email protected]

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: [email protected]
    For additional commands, e-mail: [email protected]
  • Willy De Waele at Nov 1, 2004 at 4:55 pm
    The lucene-demo is now working fine outside the tomcat/webapps dir.
    I created a folder, lets say 'c:/Test'. Copied the lucene-doxs to
    that folder.
    Afterwards I deployed the war file to this folder.
    I created an index to 'c:/test/index' and modified the
    configuration.jsp
    Last I added an application to tomcat (lucene.xml in the conf
    folder).
    And ... lucene is working fine!

    Thanks a lot for your help
    Regards
    Willy

    -----Original Message-----
    From: Erik Hatcher
    Sent: zondag 31 oktober 2004 09:55
    To: Lucene User
    Subject: Fwd: Search.jhtml ?




    Begin forwarded message:
    From: Erik Hatcher <[email protected]>
    Date: October 31, 2004 3:53:39 AM EST
    To: <[email protected]>
    Subject: Re: Search.jhtml ?
    On Oct 30, 2004, at 9:07 AM, Willy De Waele wrote:
    Indeed, when I follow the procedure it is working fine ...
    I created an index with following statement:
    java org.apache.lucene.demo.IndexHTML -create
    "E:/Java/lucene-1.4.2/docs"
    default index-dir: index
    all references absolute
    Why can't I search an index of files somewhere on the harddisk, in
    other words why
    should the 'docs' folder in de webapps/luceneweb folder ?
    That's just what makes the demo work. Again, the demo application is
    merely that (and relatively weakly done, as you can tell). Feel free
    to borrow parts of it or adapt it for other purposes than its basic
    purpose of showing how to index and search.

    I have had strong intentions to improve the Lucene demo application.
    The Lucene book is now done (final typesetting corrections are now
    being made), and I've got a few more speaking commitments (Reston and
    Denver NFJS as well as ApacheCon). I plan on taking a bit of a
    breather after that in November, and then in December I plan on ramping
    up my involvement with the Lucene community, and improving the demo
    application is going to be part of those efforts.

    If you have improvements to contribute or suggest, send them our way!
    :)

    Erik
    -----Original Message-----
    From: Erik Hatcher
    Sent: vrijdag 29 oktober 2004 22:22
    To: Lucene Users List
    Subject: Re: Search.jhtml ?

    On Oct 29, 2004, at 12:12 PM, Willy De Waele wrote:

    First at all, thanks for you answer.
    Now I get some results with the jsp's, but the url's in de result
    is
    not clickeable ...
    Is this normal? (should I modify the template?)
    It's a known issue that the Lucene web demo is quite shabby.

    I created detailed instructions for running it as an appendix to
    Lucene
    in Action. I'm pasting the relevant sections below:


    Running the web application demo The web demo is slightly involved to
    set up and run properly. You need a web container; our instructions
    are for Tomcat 5. The docs/demo.html documentation provides detailed
    instructions for setting
    up and running the web application, but you can also follow the steps
    provided here. The index used by the web application differs slightly
    from that in the command-line demo. First, it restricts itself to
    indexing only .html, .htm, and .txt files. Each file it processes
    (including .txt files) is parsed using a custom rudimentary HTML
    parser. To build the index initially, execute IndexHTML:

    java -cp lucene-1.4.2.jar;lucene-demos-1.4.2.jar
    org.apache.lucene.demo.IndexHTML -create -index webindex docs

    ...
    adding docs/resources.html
    adding docs/systemproperties.html
    adding docs/whoweare.html
    Optimizing index... 7220 total milliseconds

    The -index webindex switch sets the location of the index directory.
    In
    a moment, you’ll need the full path to this directory to configure the
    web application. The final docs argument to IndexHTML is the directory
    tree to index. The –create switch creates an index from scratch.
    Remove
    this switch to update the index with files that have been added or
    changed since the last time the index was built. Next, deploy
    luceneweb.war (from the root directory of the extracted distribution)
    into CATALINA_HOME/webapps. Start Tomcat, wait for the container to
    complete the startup routine, and then edit
    CATALINA_HOME/webapps/luceneweb/configuration.jsp using a text editor
    (Tomcat should have expanded the .war file into a luceneweb directory
    automatically). Change the value of indexLocation appropriately, as in
    this example, specifying the absolute path to the index you built with
    IndexHTML:

    String indexLocation =
    "/dev/LuceneInAction/install/lucene-1.4.1/webindex";

    Now you’re ready to try the web application. Visit
    http://localhost:8080/luceneweb in your web browser, and you should
    see “Welcome to the Lucene Template application...” (you can also
    change the header and footer text in configuration.jsp). If all is
    well with your configuration, searching for Lucene-specific words
    such as "QueryParser AND Analyzer" should list valid results based on
    Lucene’s documentation. You may try to click on one of the search
    results links
    and receive an error. IndexHTML indexes a url field, which in this
    case
    is a relative path of docs/.... To make the result links work
    properly,
    copy the docs directory from the Lucene distribution to
    CATALINA_HOME/webapps/luceneweb. Yes, these steps are a bit more
    manual than they should be. Rest assured that improvements to Lucene’s
    example applications are on our to-do list as soon as we’re finished
    writing this book!

    (sorry about the formatting of the above - it was pasted straight
    from a PDF)

    Erik

    TIA & Regards
    Willy

    -----Original Message-----
    From: Daniel Naber
    Sent: donderdag 28 oktober 2004 20:21
    To: Lucene Users List
    Subject: Re: Search.jhtml ?

    On Thursday 28 October 2004 15:01, Willy De Waele wrote:

    Executing the demos as a bat file (Windows) is working
    fine, but using lucene as a web 'application' is not working ...
    I think that Search.jhtml is totally outdated, please try src/jsp
    instead.

    Regards
    Daniel

    --
    http://www.danielnaber.de



    --------------------------------------------------------------------
    -
    To unsubscribe, e-mail: [email protected]
    For additional commands, e-mail: [email protected]



    ---------------------------------------------------------------------
    To unsubscribe, e-mail: [email protected]
    For additional commands, e-mail: [email protected]

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupjava-user @
categorieslucene
postedOct 28, '04 at 1:01p
activeNov 1, '04 at 4:55p
posts8
users3
websitelucene.apache.org

People

Translate

site design / logo © 2023 Grokbase