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 Robert Taylor <rt...@newatlanta.com> on 2003/09/12 17:51:36 UTC

Lucene and Struts

I have a web application developed with Struts and I wish to add the ability
for users to search the web application content.

Some of the web application pages are directly accessible via a URL and
others are only accessible via a Struts action mapping URL.

All of the web application pages are composite pages (similar to Tiles)
where
each page includes and populates a template with content. The content may
come from various locations but the runtime result is a complete page.

After downloading Lucene and working with the demo applications I quickly
realized the problems voiced by Marco Tedone  in this archived message:

http://www.mail-archive.com/lucene-user@jakarta.apache.org/msg04656.html


I read through the thread and it didn't appear that there was a
simple/elegant solution.

I was wondering if anyone has come up with a simple/elegant solution for
using Lucene
with Struts/Tiles.


robert






RE: Lucene and Struts

Posted by Robert Taylor <rt...@newatlanta.com>.
Marco thanks for replying....but alas I'm not using
Tiles with this project.

robert


> -----Original Message-----
> From: Marco Tedone [mailto:mtedone@jemos.org]
> Sent: Friday, September 12, 2003 12:25 PM
> To: Lucene Users List
> Subject: Re: Lucene and Struts
>
>
> Well, I'm working on it and I collected all the information I
> need. Now it's
> time to put them together in a unique, possibly fully functional solution.
>
> What I'm realizing is a search facility which shows the user links to
> actions which forward to the jsp of interest. This is possible by
> retrieving
> the configuration information both on the struts-config.xml file (mapping
> between action and JSPs), and on the tiles-defs.xml file (Yes, I'm using
> Tiles). I've been desperate for a while, but then someone from the struts
> mailing list illuminated me with the following trick:
>
>  <definition name="tiles.administer" extends="xmlLayout">
>       <put name="title" value="Jemos Administation page"/>
>       <put name="security" value="/shared/adminSecurityTest.jsp"/>
>       <put name="body" value="/site/bodies/administer-body.jsp"/>
>       <put name="definition.location.tiles.administer"
> value="administer.jsp" />
>
> Basically, it seems (because I haven't tried yet) that it's possible to
> define an additional property in a Tiles definition, without it being
> actually present in any JSP. If we immagine to put a property which tells,
> for each JSP which really contains the content, which is the JSP
> defined in
> the struts configuration file, from there it's possible to get the map
> between an action and this JSP, therefore (even if the road is quite long)
> the mapping is possible. Here's how it works:
>
> 1) An administrator function (in my case a Struts action) creates
> an index,
> given a specific folder (in my case the webapp/myapp folder) as input, a
> desired folder as output, and specifying one or more file extensions to
> consider for the search (Search facility realized with a steteless session
> bean deployed under Jboss). The result is a database with the following
> fields:
>
> 2) A user submits a query: a component will retrieve from the
> index all the
> content-matching JSPs paths and thanks to another facility I developed, it
> will remove the system-relative-path (let's say D:\Tomcat\webapps because
> I'm running on Windows) from the JSP (returning the context relative path,
> let's say myapp/content-body.jsp). All the matching JSPs will be
> returned as
> a collection (or something similar...).
>
> 3) For each path, another component will look in the Tiles defs
> the matching
> JSP (thanks to the above trick!); with this information the Struts
> configuration file will be queried and the matching action retrieved: from
> here it's quite simple to create a web-fully-context-path to show to the
> user...
>
> Result? The user will be shown with links to the actions which map to the
> JSPs which contain what she searched for...
>
> Limit? Initially this application will work for Tiles (even if I'll try to
> apply some design patterns to allow different implementation) but
> my goal is
> to design a general solution which could work with basic JSPs,
> include JSPs
> and so on...
>
> Hope this will help,
>
> Marco
>
>
> ----- Original Message -----
> From: "Robert Taylor" <rt...@newatlanta.com>
> To: <lu...@jakarta.apache.org>
> Sent: Friday, September 12, 2003 4:51 PM
> Subject: Lucene and Struts
>
>
> > I have a web application developed with Struts and I wish to add the
> ability
> > for users to search the web application content.
> >
> > Some of the web application pages are directly accessible via a URL and
> > others are only accessible via a Struts action mapping URL.
> >
> > All of the web application pages are composite pages (similar to Tiles)
> > where
> > each page includes and populates a template with content. The
> content may
> > come from various locations but the runtime result is a complete page.
> >
> > After downloading Lucene and working with the demo applications
> I quickly
> > realized the problems voiced by Marco Tedone  in this archived message:
> >
> > http://www.mail-archive.com/lucene-user@jakarta.apache.org/msg04656.html
> >
> >
> > I read through the thread and it didn't appear that there was a
> > simple/elegant solution.
> >
> > I was wondering if anyone has come up with a simple/elegant solution for
> > using Lucene
> > with Struts/Tiles.
> >
> >
> > robert
> >
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> >
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>


Re: Lucene and Struts

Posted by Marco Tedone <mt...@jemos.org>.
Well, I'm working on it and I collected all the information I need. Now it's
time to put them together in a unique, possibly fully functional solution.

What I'm realizing is a search facility which shows the user links to
actions which forward to the jsp of interest. This is possible by retrieving
the configuration information both on the struts-config.xml file (mapping
between action and JSPs), and on the tiles-defs.xml file (Yes, I'm using
Tiles). I've been desperate for a while, but then someone from the struts
mailing list illuminated me with the following trick:

 <definition name="tiles.administer" extends="xmlLayout">
      <put name="title" value="Jemos Administation page"/>
      <put name="security" value="/shared/adminSecurityTest.jsp"/>
      <put name="body" value="/site/bodies/administer-body.jsp"/>
      <put name="definition.location.tiles.administer"
value="administer.jsp" />

Basically, it seems (because I haven't tried yet) that it's possible to
define an additional property in a Tiles definition, without it being
actually present in any JSP. If we immagine to put a property which tells,
for each JSP which really contains the content, which is the JSP defined in
the struts configuration file, from there it's possible to get the map
between an action and this JSP, therefore (even if the road is quite long)
the mapping is possible. Here's how it works:

1) An administrator function (in my case a Struts action) creates an index,
given a specific folder (in my case the webapp/myapp folder) as input, a
desired folder as output, and specifying one or more file extensions to
consider for the search (Search facility realized with a steteless session
bean deployed under Jboss). The result is a database with the following
fields:

2) A user submits a query: a component will retrieve from the index all the
content-matching JSPs paths and thanks to another facility I developed, it
will remove the system-relative-path (let's say D:\Tomcat\webapps because
I'm running on Windows) from the JSP (returning the context relative path,
let's say myapp/content-body.jsp). All the matching JSPs will be returned as
a collection (or something similar...).

3) For each path, another component will look in the Tiles defs the matching
JSP (thanks to the above trick!); with this information the Struts
configuration file will be queried and the matching action retrieved: from
here it's quite simple to create a web-fully-context-path to show to the
user...

Result? The user will be shown with links to the actions which map to the
JSPs which contain what she searched for...

Limit? Initially this application will work for Tiles (even if I'll try to
apply some design patterns to allow different implementation) but my goal is
to design a general solution which could work with basic JSPs, include JSPs
and so on...

Hope this will help,

Marco


----- Original Message ----- 
From: "Robert Taylor" <rt...@newatlanta.com>
To: <lu...@jakarta.apache.org>
Sent: Friday, September 12, 2003 4:51 PM
Subject: Lucene and Struts


> I have a web application developed with Struts and I wish to add the
ability
> for users to search the web application content.
>
> Some of the web application pages are directly accessible via a URL and
> others are only accessible via a Struts action mapping URL.
>
> All of the web application pages are composite pages (similar to Tiles)
> where
> each page includes and populates a template with content. The content may
> come from various locations but the runtime result is a complete page.
>
> After downloading Lucene and working with the demo applications I quickly
> realized the problems voiced by Marco Tedone  in this archived message:
>
> http://www.mail-archive.com/lucene-user@jakarta.apache.org/msg04656.html
>
>
> I read through the thread and it didn't appear that there was a
> simple/elegant solution.
>
> I was wondering if anyone has come up with a simple/elegant solution for
> using Lucene
> with Struts/Tiles.
>
>
> robert
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>




too many files within one index

Posted by hui <hu...@triplehop.com>.
Hi,
I am using Lucene 1.3 rc released on March.20, 2003.
For some reason, the files in the index directory increase very very quickly
for some documents and reach over 3000 files within half hour and even can
not optimize the index.Then it grows up to 33000 files within one index.
In most of other testing cases, it normally never reach 1000 even without
optimization.

Any idea about this?

regards,
Hui


RE: Lucene and Struts

Posted by Robert Taylor <rt...@newatlanta.com>.
Yes! I came to the same conclusion. It seems like the most elegant solution
for web applications built using composite pages (Struts or non-struts).

Has anyone implemented this approach?

Has anyone used LARM for this type of approach?
http://jakarta.apache.org/lucene/docs/lucene-sandbox/larm/overview.html

robert


> -----Original Message-----
> From: Jeff Linwood [mailto:jeff@greenninja.com]
> Sent: Friday, September 12, 2003 11:59 AM
> To: Lucene Users List
> Subject: Re: Lucene and Struts
>
>
> You could crawl the web site to build the index.  The crawling strategy is
> going to vary depending on how your site is set up in terms of
> secured areas
> vs non-secured, how pages are linked, etc.
>
> Jeff
> ----- Original Message -----
> From: "Robert Taylor" <rt...@newatlanta.com>
> To: <lu...@jakarta.apache.org>
> Sent: Friday, September 12, 2003 10:51 AM
> Subject: Lucene and Struts
>
>
> > I have a web application developed with Struts and I wish to add the
> ability
> > for users to search the web application content.
> >
> > Some of the web application pages are directly accessible via a URL and
> > others are only accessible via a Struts action mapping URL.
> >
> > All of the web application pages are composite pages (similar to Tiles)
> > where
> > each page includes and populates a template with content. The
> content may
> > come from various locations but the runtime result is a complete page.
> >
> > After downloading Lucene and working with the demo applications
> I quickly
> > realized the problems voiced by Marco Tedone  in this archived message:
> >
> > http://www.mail-archive.com/lucene-user@jakarta.apache.org/msg04656.html
> >
> >
> > I read through the thread and it didn't appear that there was a
> > simple/elegant solution.
> >
> > I was wondering if anyone has come up with a simple/elegant solution for
> > using Lucene
> > with Struts/Tiles.
> >
> >
> > robert
> >
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>


Re: Lucene and Struts

Posted by Jeff Linwood <je...@greenninja.com>.
You could crawl the web site to build the index.  The crawling strategy is
going to vary depending on how your site is set up in terms of secured areas
vs non-secured, how pages are linked, etc.

Jeff
----- Original Message ----- 
From: "Robert Taylor" <rt...@newatlanta.com>
To: <lu...@jakarta.apache.org>
Sent: Friday, September 12, 2003 10:51 AM
Subject: Lucene and Struts


> I have a web application developed with Struts and I wish to add the
ability
> for users to search the web application content.
>
> Some of the web application pages are directly accessible via a URL and
> others are only accessible via a Struts action mapping URL.
>
> All of the web application pages are composite pages (similar to Tiles)
> where
> each page includes and populates a template with content. The content may
> come from various locations but the runtime result is a complete page.
>
> After downloading Lucene and working with the demo applications I quickly
> realized the problems voiced by Marco Tedone  in this archived message:
>
> http://www.mail-archive.com/lucene-user@jakarta.apache.org/msg04656.html
>
>
> I read through the thread and it didn't appear that there was a
> simple/elegant solution.
>
> I was wondering if anyone has come up with a simple/elegant solution for
> using Lucene
> with Struts/Tiles.
>
>
> robert
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>


Re: Lucene and Struts

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Saturday, September 13, 2003, at 11:08  AM, Eric Jain wrote:
>> and I'm very particular
>> about URL's and how it maps to content
>
> I, too, am very particular about that.

A bit off topic, but I'll indulge myself for at least one more message  
on this.  Here is a fun link I've been saving for a while:

	http://www.pixelcharmer.com/fieldnotes/archives/process_designing/ 
2003/000285.html

(notice their URL is a bit lame :)

> Unfortunately none of the web application frameworks I am aware of
> support this philosophy :-(

True, but I don't use an existing framework for a CMS, which my blog is  
a "lite" version of.  I've done a lot with Struts, and I use it for  
heavy form-based sites and it does the job acceptably well.  Now I'm  
embarking on a relatively large-scale Tapestry project, and its URL's  
are even more ridiculous.  At least with Struts you can control how  
URI's are mapped to ActionServlet, so typically either *.do or /do/*,  
and you have full control over the rest of the URI with the action  
mappings.  There is even wildcard support to map a range of URI's to  
the same Action, which may have already been added to the latest  
codebase.

> There are some workarounds such as using mod_rewrite, but so far  
> nothing
> really satisfying...

There is something slightly satisfying about the ease that mod_rewrite  
does its thing though.  I use it, in fact, to map my old blog URL to my  
new one - it is a straightforward domain and path prefix change,  
nothing dramatic though.

	Erik


Re: Lucene and Struts

Posted by Eric Jain <Er...@isb-sib.ch>.
> and I'm very particular
> about URL's and how it maps to content

I, too, am very particular about that.

Unfortunately none of the web application frameworks I am aware of
support this philosophy :-(

There are some workarounds such as using mod_rewrite, but so far nothing
really satisfying...

--
Eric Jain


Re: Lucene and Struts

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Friday, September 12, 2003, at 03:33  PM, Jeff Linwood wrote:
> Crawling's a good solution because it's so easy to map the content 
> back to a
> URL.

:)

I smile because my blog is powered by Lucene, and I'm very particular 
about URL's and how it maps to content.  For example:

	http://www.blogscene.org/erik/Computers/Articles/javanet_jul03.html

This is a dynamically generated (despite the .html extension).  I have 
a servlet mapped to /erik/*.  My blog entries are literally on the file 
system as .txt files (blosxom-style, first line is title, rest is 
body).  The Ant <index> task indexes them based on the relative path 
from the blog root, and each directory is a category, each text file a 
blog.  You'd find this blog by searching like this:

	http://www.blogscene.org/erik?q=%22lucene+intro%22

Tacking on ?flav=rss will give you an RSS feed of a particular query!  
You could also see it as text here:

	http://www.blogscene.org/erik/Computers/Articles/javanet_jul03.txt

(the extension is used to determine the "flavor" presented - text 
format is generated using lynx).

All blog entries in the /Computers/Articles category as an RSS feed:

	http://www.blogscene.org/erik/Computers/Articles?flav=rss

All of the above requests are dynamically using a Lucene PrefixQuery 
based on the URI, and if you use the search box it AND's that with a 
QueryParser parsed query allowing queries restricted to a category and 
below.  Selecting a blog by title is like this:

	http://www.blogscene.org/erik?q=title:intro

> Of course, this all depends on what is content in your system, like you
> said. The advantage of crawling is that anything on the web page ends 
> up in
> the search engine.  That's also one of the disadvantages.

I agree that crawling can get the job done, but I'd prefer to integrate 
Lucene at a lower-level with more metadata than just a URL and HTML.  
Lucene *is* the content repository in my blog.

	Erik


Re: Lucene and Struts

Posted by Jeff Linwood <je...@greenninja.com>.
Crawling's a good solution because it's so easy to map the content back to a
URL.  For a CMS, it might be the case that you have content in the
repository that isn't ready to be on the site yet, so it's not published to
a URL.  You'd have to keep track of what content is published to which URL
on the site to build the index properly.

Of course, this all depends on what is content in your system, like you
said. The advantage of crawling is that anything on the web page ends up in
the search engine.  That's also one of the disadvantages.

Jeff
----- Original Message ----- 
From: "Erik Hatcher" <er...@ehatchersolutions.com>
To: "Lucene Users List" <lu...@jakarta.apache.org>
Sent: Friday, September 12, 2003 1:12 PM
Subject: Re: Lucene and Struts


> I've been lurking on these related threads to see what others came up
> with.
>
> The real issue here is defining what the "content" really is.  If the
> web application is solely your own creation, then I feel crawling or
> weird magical tricks with Struts/Tiles/taglibs is not the proper
> approach.  What I'd recommend is you keep the content in a database or
> in some other type of repository and index that directly with Lucene.
> Access that content with your Struts actions and push it into the
> display using the standard mechanisms for Struts/taglibs.
>
> Is this static content that is just text on JSP pages?  If so, pull the
> content out and put it there dynamically - and decouple the content
> from the presentation, and thusly making indexing much easier and
> sensical.
>
> Is this feasible with what you're doing?  If not, why not?
>
> Erik
>
> On Friday, September 12, 2003, at 11:51  AM, Robert Taylor wrote:
>
> > I have a web application developed with Struts and I wish to add the
> > ability
> > for users to search the web application content.
> >
> > Some of the web application pages are directly accessible via a URL and
> > others are only accessible via a Struts action mapping URL.
> >
> > All of the web application pages are composite pages (similar to Tiles)
> > where
> > each page includes and populates a template with content. The content
> > may
> > come from various locations but the runtime result is a complete page.
> >
> > After downloading Lucene and working with the demo applications I
> > quickly
> > realized the problems voiced by Marco Tedone  in this archived message:
> >
> > http://www.mail-archive.com/lucene-user@jakarta.apache.org/
> > msg04656.html
> >
> >
> > I read through the thread and it didn't appear that there was a
> > simple/elegant solution.
> >
> > I was wondering if anyone has come up with a simple/elegant solution
> > for
> > using Lucene
> > with Struts/Tiles.
> >
> >
> > robert
> >
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>


RE: Lucene and Struts

Posted by Robert Taylor <rt...@newatlanta.com>.
Thanks again for your insight on this. 

I'll review both solutions.

robert

> -----Original Message-----
> From: Erik Hatcher [mailto:erik@ehatchersolutions.com]
> Sent: Friday, September 12, 2003 4:21 PM
> To: Lucene Users List
> Subject: Re: Lucene and Struts
> 
> 
> On Friday, September 12, 2003, at 02:52  PM, Robert Taylor wrote:
> > I agree that this makes indexing rather straight forward, but....
> > then I have to build/use a content management system for my
> > existing web application(s). That's not going to fly for me right now.
> > Maybe in the future - but for now, I need to provide content-searching
> > capability for my web applications.
> 
> You can roll your own poor-man's content management system that would 
> fit into your web apps just fine.  If the content you truly want 
> indexed is one big block of text, for example, just make .txt files for 
> each block and then <jsp:include> it where appropriate.  Sure, this 
> will involve some connection between the URL and the .txt file.  
> Indexing with Lucene then becomes trivial.
> 
> > Why is indexing the site using a crawler not such a good idea for web
> > applications
> > where 99% of the content is static?
> 
> I just think it is more of a last resort type of solution, but 
> certainly it'll work.
> 
> >  If the content changes, you just rebuild
> > the indexes. This solution works if I have a legacy web site or one 
> > deployed
> > as a web application. It works if my pages are composite or atomic. It 
> > works
> > if
> > my content is dynamic or static.
> 
> Sure.  But you might also be missing metadata, if that is an important 
> piece.  Who is the author of the content?  When was it created?  etc.  
> This is all information that you'd lose by crawling, unless you encode 
> that with meta tags somehow, or can parse it out.
> 
> 	Erik
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 
> 

Re: Lucene and Struts

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Friday, September 12, 2003, at 02:52  PM, Robert Taylor wrote:
> I agree that this makes indexing rather straight forward, but....
> then I have to build/use a content management system for my
> existing web application(s). That's not going to fly for me right now.
> Maybe in the future - but for now, I need to provide content-searching
> capability for my web applications.

You can roll your own poor-man's content management system that would 
fit into your web apps just fine.  If the content you truly want 
indexed is one big block of text, for example, just make .txt files for 
each block and then <jsp:include> it where appropriate.  Sure, this 
will involve some connection between the URL and the .txt file.  
Indexing with Lucene then becomes trivial.

> Why is indexing the site using a crawler not such a good idea for web
> applications
> where 99% of the content is static?

I just think it is more of a last resort type of solution, but 
certainly it'll work.

>  If the content changes, you just rebuild
> the indexes. This solution works if I have a legacy web site or one 
> deployed
> as a web application. It works if my pages are composite or atomic. It 
> works
> if
> my content is dynamic or static.

Sure.  But you might also be missing metadata, if that is an important 
piece.  Who is the author of the content?  When was it created?  etc.  
This is all information that you'd lose by crawling, unless you encode 
that with meta tags somehow, or can parse it out.

	Erik


RE: Lucene and Struts

Posted by Robert Taylor <rt...@newatlanta.com>.
Erik, thanks for replying:

> What I'd recommend is you keep the content in a database or
> in some other type of repository and index that directly with Lucene.
I agree that this makes indexing rather straight forward, but....
then I have to build/use a content management system for my
existing web application(s). That's not going to fly for me right now.
Maybe in the future - but for now, I need to provide content-searching
capability for my web applications.


Why is indexing the site using a crawler not such a good idea for web
applications
where 99% of the content is static? If the content changes, you just rebuild
the indexes. This solution works if I have a legacy web site or one deployed
as a web application. It works if my pages are composite or atomic. It works
if
my content is dynamic or static.

robert



> -----Original Message-----
> From: Erik Hatcher [mailto:erik@ehatchersolutions.com]
> Sent: Friday, September 12, 2003 2:13 PM
> To: Lucene Users List
> Subject: Re: Lucene and Struts
>
>
> I've been lurking on these related threads to see what others came up
> with.
>
> The real issue here is defining what the "content" really is.  If the
> web application is solely your own creation, then I feel crawling or
> weird magical tricks with Struts/Tiles/taglibs is not the proper
> approach.  What I'd recommend is you keep the content in a database or
> in some other type of repository and index that directly with Lucene.
> Access that content with your Struts actions and push it into the
> display using the standard mechanisms for Struts/taglibs.
>
> Is this static content that is just text on JSP pages?  If so, pull the
> content out and put it there dynamically - and decouple the content
> from the presentation, and thusly making indexing much easier and
> sensical.
>
> Is this feasible with what you're doing?  If not, why not?
>
> 	Erik
>
> On Friday, September 12, 2003, at 11:51  AM, Robert Taylor wrote:
>
> > I have a web application developed with Struts and I wish to add the
> > ability
> > for users to search the web application content.
> >
> > Some of the web application pages are directly accessible via a URL and
> > others are only accessible via a Struts action mapping URL.
> >
> > All of the web application pages are composite pages (similar to Tiles)
> > where
> > each page includes and populates a template with content. The content
> > may
> > come from various locations but the runtime result is a complete page.
> >
> > After downloading Lucene and working with the demo applications I
> > quickly
> > realized the problems voiced by Marco Tedone  in this archived message:
> >
> > http://www.mail-archive.com/lucene-user@jakarta.apache.org/
> > msg04656.html
> >
> >
> > I read through the thread and it didn't appear that there was a
> > simple/elegant solution.
> >
> > I was wondering if anyone has come up with a simple/elegant solution
> > for
> > using Lucene
> > with Struts/Tiles.
> >
> >
> > robert
> >
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>


Re: Lucene and Struts

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
I've been lurking on these related threads to see what others came up  
with.

The real issue here is defining what the "content" really is.  If the  
web application is solely your own creation, then I feel crawling or  
weird magical tricks with Struts/Tiles/taglibs is not the proper  
approach.  What I'd recommend is you keep the content in a database or  
in some other type of repository and index that directly with Lucene.   
Access that content with your Struts actions and push it into the  
display using the standard mechanisms for Struts/taglibs.

Is this static content that is just text on JSP pages?  If so, pull the  
content out and put it there dynamically - and decouple the content  
from the presentation, and thusly making indexing much easier and  
sensical.

Is this feasible with what you're doing?  If not, why not?

	Erik

On Friday, September 12, 2003, at 11:51  AM, Robert Taylor wrote:

> I have a web application developed with Struts and I wish to add the  
> ability
> for users to search the web application content.
>
> Some of the web application pages are directly accessible via a URL and
> others are only accessible via a Struts action mapping URL.
>
> All of the web application pages are composite pages (similar to Tiles)
> where
> each page includes and populates a template with content. The content  
> may
> come from various locations but the runtime result is a complete page.
>
> After downloading Lucene and working with the demo applications I  
> quickly
> realized the problems voiced by Marco Tedone  in this archived message:
>
> http://www.mail-archive.com/lucene-user@jakarta.apache.org/ 
> msg04656.html
>
>
> I read through the thread and it didn't appear that there was a
> simple/elegant solution.
>
> I was wondering if anyone has come up with a simple/elegant solution  
> for
> using Lucene
> with Struts/Tiles.
>
>
> robert
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org