aspose file tools*
The moose likes Other Open Source Projects and the fly likes Need Suggestion for Local Search Engine Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Need Suggestion for Local Search Engine" Watch "Need Suggestion for Local Search Engine" New topic
Author

Need Suggestion for Local Search Engine

chetan sisodiya
Greenhorn

Joined: Nov 14, 2011
Posts: 12
Hello friends

I need to make a local search engine where we can people can insert their text or logs came during testing, and we can give the solution for their problem. Its like making an ISSUE TRACKER Web Tool.

We gonne save the solution of for logs in data base but its shuld give back all the possible solution matching with the problem given in search box.

Is there any exixting library I can use for this with little modification ?


Thanks
Shailesh Narkhede
Ranch Hand

Joined: Jul 10, 2008
Posts: 368
There is one search API under apache named LUCENE, you can dig into API and try to use it in your application.


Thanks,
Shailesh
chetan sisodiya
Greenhorn

Joined: Nov 14, 2011
Posts: 12
yeah I have been through it. It is covered under GNU license. I want to use for office purpose, and even we can sell it later. I think its not possible to sell ant app developed on Lucene.


Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
I think you are mistaken. Lucene is an Apache project, and as such it is covered by the Apache license, not by any GNU license. The Apache license is rather different than the various GNU licenses; their respective Wikipedia pages will give you a good idea about how each license works.

And yes - Lucene absolutely rocks :-)
Shailesh Narkhede
Ranch Hand

Joined: Jul 10, 2008
Posts: 368
I guess you can sell application developed in Lucene but,

you can not sell LUCENE fremawork by adding some new functionality in lucene itself.
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
Shailesh Narkhede wrote:you can not sell LUCENE fremawork by adding some new functionality in lucene itself.

Why not? Are you familiar with the Apache license?
Shailesh Narkhede
Ranch Hand

Joined: Jul 10, 2008
Posts: 368
Ohhh that was my guess just gone through license FAQ it is clearly mentioned that I can sell it.

Below is the questions for the same which I found from apache site.

Thanks Tim for correcting me....

I've made improvements to the Apache code; may I distribute the modified result?
Absolutely -- subject to the terms of the Apache license, of course. You can give your modified code away for free, or sell it, or keep it to yourself, or whatever you like. Just remember that the original code is still covered by the Apache license and you must comply with its terms. Even if you change every single line of the Apache code you're using, the result is still based on the Foundation's licensed code. You may distribute the result under a different license, but you need to acknowledge the use of the Foundation's software. To do otherwise would be stealing.

If you think your changes would be found useful by others, though, we do encourage you to submit them to the appropriate Apache project for possible inclusion.

I have made changes to an Apache package and I want to distribute them. Do I need to contribute them to the Apache Software Foundation?
No. You can keep your changes a secret if you like. Maybe your modifications are embarrassing, maybe you'll get rich selling those improvements. Whatever. But please seriously consider giving your changes back! We all benefit when you do.


chetan sisodiya
Greenhorn

Joined: Nov 14, 2011
Posts: 12
tnku guys.

How can i deploy it on windows?
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
Lucene is not a product, it is an API. So you need to write code to use it, specifically to index and then later search your documents. You can find example codes that should get you going on the Lucene site.
Karthik Shiraly
Ranch Hand

Joined: Apr 04, 2009
Posts: 513
    
    6
While Lucene can certainly do the job, the Solr server - a subproject of the Lucene family which uses Lucene at its core - gives you a more readymade executable system.
Lucene is just a toolkit for efficient full text search, while Solr adds all the bells and whistles that all client applications typically require. It means you'll have to write much less code with Solr than you would with Lucene.
For your requirements,
- Solr gives you a DB import functionality out of the box. You only need to change an XML configuration file, and Solr will do all the DB querying and pulling in data for you.
The raw Lucene approach would involve you having to code all the DB querying in java code.

- With Solr, tokenization behaviours and document schema for your log records can be specified in XML configuration files and changed easily.
With Lucene, you either have to hardcode the schema and tokenization behaviour in java code, or rollout your own configuration strategy to keep it flexible.
Because the data here are application logs which may have unusual strings like "at com.myapplication.myclass.mymethod(line 327)", keeping tokenization behaviour in an external schema and being able to quickly modify it and try out different behaviours through trial and error is a plus.

- Solr is already a standalone executable system. Just download and run a jar as described here and your search engine will be up and running. You can send HTTP requests and get back search results in JSON/XML format.
Depending on how simple your use cases are, you may even be able to use solr directly from javascript through ajax (though I've found this rarely works out, because simplistic search implementations don't give the most relevant results - you usually have to deploy some business logic inbetween the browser and solr server, and post process the results to find the most relevant ones).

- Solr gives you drilldown search (that's the term for the categories and filters that sites like ebay provide in their sidebars; also called "faceting"). This is useful if, for example, you want your users to filter only on certain components of your application or certain classes or java packages.

- From a programming point of view, the Solr API is much simpler than Lucene API. With Lucene, you have to manage not only the search but also the search index infrastructure. Solr handles the search index automatically, and exposes just the primary search API to your application.

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Need Suggestion for Local Search Engine