Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within JForum
Search Coderanch
Advance search
Google search
Register / Login
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
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
JForum
Search help please!
Migrated From Jforum.net
Ranch Hand
Posts: 17424
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
When doing a search it seems JForum does not search through descriptions given to an attachment.
Am I missing something somewhere, or can someone point me in the right direction for adding this functionaility ?
Many thanks.
Jax.
[originally posted on jforum.net by jax]
Migrated From Jforum.net
Ranch Hand
Posts: 17424
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Never mind.
looks like I've found it. Just need to do some
testing
.
[originally posted on jforum.net by jax]
Migrated From Jforum.net
Ranch Hand
Posts: 17424
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Words used in a description to an attachment are not added to the searchable
word
index by JForum.
If you want to enable this, alter
GenericSearchIndexerDAO.java
and look for the
insertSearchWords(List Posts)
method.
there is a line there that says:
StringBuffer textBuffer = new StringBuffer(p.getText()).append(" ").append(p.getSubject()).toString();
Replace that with:
StringBuffer textBuffer = new StringBuffer(p.getText()).append(" ").append(p.getSubject()); if (p.hasAttachments()) { List atList = am.selectAttachments(p.getId()); String theDescription = ""; String theFilename = ""; Attachment attach = null; AttachmentInfo atInfo = null; for (Iterator atIter = atList.iterator(); atIter.hasNext();) { attach = (Attachment) atIter.next(); atInfo = attach.getInfo(); theDescription = atInfo.getComment(); theFilename = atInfo.getRealFilename(); textBuffer.append(" ").append(theDescription).append(" ").append(theFilename); } } String text = textBuffer.toString();
that should do the trick.
[originally posted on jforum.net by jax]
The glass is neither half full or half empty. It is too big. But this tiny ad is just right:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
File Transfer - Web Services over FTP?
Web Service in java
Noob question
A question related to creating java based webservices
Reading soap header
More...