You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by Eirikur Hrafnsson <ei...@idega.is> on 2005/01/04 15:47:42 UTC
How to use Lucene in Slide? A few "easy" questions...
1. What version of Slide and Lucene do I need to add Lucene indexing to
my Slide store? There seems be some Lucene stuff in Slide 2.1...
2. How do I activate the indexing?
3. Can I have seperate indexes for different URI's?
E.g. I would like to have one index for my articles (xml based docs)
under '/files/cms/articles/....' and possibly a custom indexer (search
document)
And another index for all other documents (Word,excel,pdf etc.) under
'/files/cms/documents/...'
My goal is to have a web based search with "Spotlight" like search
results categorizing.
4. How do I do a search in code if I have the query string?
Best Regards
Eirikur S. Hrafnsson, eiki@idega.is
Chief Software Engineer
Idega Software
http://www.idega.com
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org
Re: How to use Lucene in Slide? A few "easy" questions...
Posted by Eirikur Hrafnsson <ei...@idega.is>.
Hi Stefan
On 4.1.2005, at 15:25, Stefan Lützkendorf wrote:
> Hello Eirikur
>
>> 1. What version of Slide and Lucene do I need to add Lucene indexing
>> to my Slide store? There seems be some Lucene stuff in Slide 2.1...
> the stuff in 2.1 is rather experimental, I think. In 2.2 (on the cvs
> HEAD available) it will be much more complete, I hope.
Is the HEAD safe to use? Do you know when the first beta (or better)
release will be for 2.2? Seems to me that we are starting to need 2.2
:)
>> 2. How do I activate the indexing?
> For the stuff in 2.2 there is some doc under
> http://wiki.apache.org/jakarta-slide/DaslConfiguration
Ok I will study that.
>> 3. Can I have seperate indexes for different URI's?
>> E.g. I would like to have one index for my articles (xml based docs)
>> under '/files/cms/articles/....' and possibly a custom indexer
>> (search document)
>> And another index for all other documents (Word,excel,pdf etc.) under
>> '/files/cms/documents/...'
> You will have a single index for each store you want to be indexed.
> Separation of different subtrees you can made via your DASL query.
> There you give a scope, i.e. the subtree you want to search.
> If you want to have different indexes, you might want to separate the
> docs in different Stores.
Ok using a DASL search with different scopes will work for me I think.
I don't want to divide up my store.
However does one always use a DASL search to search and not Lucene
directly by
creating a IndexSearcher, analyzers if needed and and a query and
calling search(query)?
Like so:
...
IndexSearcher searcher = new
IndexSearcher(reader.getReader(indexPath));
Analyzer analyzer = new StopAnalyzer();
BooleanQuery query = new BooleanQuery();
...
hits = searcher.search(query);
>> My goal is to have a web based search with "Spotlight" like search
>> results categorizing.
> Do you mean something like scoring or ranking? This is currently not
> available through DASL. Thats still a TODO.
No not a ranking system but a multiple search system like OSX 10.4
"Spotlight" feature or like QuickSilver (best osx app ever ;)
In our web platform (IdegaWeb) we have many different things we want to
search at the same time and display the results categorized like so:
Pages:
...results from our Lucene based webcrawler
Articles:
...results from Slide's Lucene indexing
Documents:
...results from Slide's Lucene indexing
(possibly even such categorized by content type like:)
Pdf's
...
Word docs
...
Images
...
Contacts:
...results from our user/group/role system via sql or ldap search.
--------------
Can the standard Slide indexing, index anything more than text files?
Can it e.g. index pdf's or MS Office docs?
>> 4. How do I do a search in code if I have the query string?
> The WebdavResource currently does not have a search method. But you
> can use the SearchMethod class.
Ok so that is the standard way of doing a DASL search? It would be nice
to have access to that Method in WebdavResource like almost everything
else.
Thanks for the quick response!
-Eirikur, Idega.
> DASL support is still under development as you see (:-)
>
> Regards, Stefan
>
>
> --
> Stefan Lützkendorf -- luetzkendorf@apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>
>
>
Best Regards
Eirikur S. Hrafnsson, eiki@idega.is
Chief Software Engineer
Idega Software
http://www.idega.com
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org
Re: How to use Lucene in Slide? A few "easy" questions...
Posted by Eirikur Hrafnsson <ei...@idega.is>.
Hi Stefan,
hope you have time to answer my last post in this thread but I have one
question about the indexes in Slide.
I see there is a property indexer and then a content indexer. If I do a
DASL search will it use both indexes?
-Eiki
On 4.1.2005, at 15:25, Stefan Lützkendorf wrote:
> Hello Eirikur
>
>> 1. What version of Slide and Lucene do I need to add Lucene indexing
>> to my Slide store? There seems be some Lucene stuff in Slide 2.1...
> the stuff in 2.1 is rather experimental, I think. In 2.2 (on the cvs
> HEAD available) it will be much more complete, I hope.
>> 2. How do I activate the indexing?
> For the stuff in 2.2 there is some doc under
> http://wiki.apache.org/jakarta-slide/DaslConfiguration
>> 3. Can I have seperate indexes for different URI's?
>> E.g. I would like to have one index for my articles (xml based docs)
>> under '/files/cms/articles/....' and possibly a custom indexer
>> (search document)
>> And another index for all other documents (Word,excel,pdf etc.) under
>> '/files/cms/documents/...'
> You will have a single index for each store you want to be indexed.
> Separation of different subtrees you can made via your DASL query.
> There you give a scope, i.e. the subtree you want to search.
> If you want to have different indexes, you might want to separate the
> docs in different Stores.
>> My goal is to have a web based search with "Spotlight" like search
>> results categorizing.
> Do you mean something like scoring or ranking? This is currently not
> available through DASL. Thats still a TODO.
>> 4. How do I do a search in code if I have the query string?
> The WebdavResource currently does not have a search method. But you
> can use the SearchMethod class.
>
> DASL support is still under development as you see (:-)
>
> Regards, Stefan
>
>
> --
> Stefan Lützkendorf -- luetzkendorf@apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>
>
>
Best Regards
Eirikur S. Hrafnsson, eiki@idega.is
Chief Software Engineer
Idega Software
http://www.idega.com
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org
Re: How to use Lucene in Slide? A few "easy" questions...
Posted by Stefan Lützkendorf <lu...@apache.org>.
Hello Eirikur
> 1. What version of Slide and Lucene do I need to add Lucene indexing to
> my Slide store? There seems be some Lucene stuff in Slide 2.1...
the stuff in 2.1 is rather experimental, I think. In 2.2 (on the cvs
HEAD available) it will be much more complete, I hope.
>
> 2. How do I activate the indexing?
For the stuff in 2.2 there is some doc under
http://wiki.apache.org/jakarta-slide/DaslConfiguration
>
> 3. Can I have seperate indexes for different URI's?
> E.g. I would like to have one index for my articles (xml based docs)
> under '/files/cms/articles/....' and possibly a custom indexer (search
> document)
> And another index for all other documents (Word,excel,pdf etc.) under
> '/files/cms/documents/...'
You will have a single index for each store you want to be indexed.
Separation of different subtrees you can made via your DASL query. There
you give a scope, i.e. the subtree you want to search.
If you want to have different indexes, you might want to separate the
docs in different Stores.
> My goal is to have a web based search with "Spotlight" like search
> results categorizing.
Do you mean something like scoring or ranking? This is currently not
available through DASL. Thats still a TODO.
>
> 4. How do I do a search in code if I have the query string?
The WebdavResource currently does not have a search method. But you can
use the SearchMethod class.
DASL support is still under development as you see (:-)
Regards, Stefan
--
Stefan Lützkendorf -- luetzkendorf@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org
Re: How to use Lucene in Slide? A few "easy" questions...
Posted by Karl Øie <ka...@gan.no>.
Im using this method now because the index updated isn't using the
indexing system that is inside slide. I have looked at the lucene
indexer in slide and its using another document->field strategy than
the one i'm using for my client. Since i can't change the
document-field strategy now because the client is already using the old
scheme to get element and attribute search and i'm adding to that
external index and not the one inside slide.
If i had more time to understand/test the indexing in slide ill
probably go for a slide implementation/extension but since the search
isn't going to be done inside slide anyway i just found this way to be
pretty straight forward.
The index i'm indexing into is an external xml indexer/searcher i have
implemented for the customer a long time ago and that i don't want to
change now.
Mvh Karl Øie
On 4. jan. 2005, at 19.43, Eirikur Hrafnsson wrote:
> So when would you use this method you are describing?
>
>
> On 4.1.2005, at 15:19, Karl Øie wrote:
>
>> Create a class that implements a Indexer or extends LoggableIndexer,
>> then configure IndexTrigger in domain.xml to send events to your
>> indexer as well as slides own indexer, that uses lucene too. The uri
>> parameter tells what location the index should be triggered for.
>>
>> <listener classname="org.apache.slide.search.IndexTrigger">
>> <configuration>
>> <indexer classname="YourIndexer" synchronous="false"
>> uri="/files/your/path"/>
>> </configuration>
>> </listener>
>>
>> Im actually working on doing this right now for my customer so it
>> would be nice to discuss this with some one else :-)
>>
>> Mvh Karl Øie
>>
>> On 4. jan. 2005, at 15.47, Eirikur Hrafnsson wrote:
>>
>>> 1. What version of Slide and Lucene do I need to add Lucene indexing
>>> to my Slide store? There seems be some Lucene stuff in Slide 2.1...
>>>
>>> 2. How do I activate the indexing?
>>>
>>> 3. Can I have seperate indexes for different URI's?
>>> E.g. I would like to have one index for my articles (xml based docs)
>>> under '/files/cms/articles/....' and possibly a custom indexer
>>> (search document)
>>> And another index for all other documents (Word,excel,pdf etc.)
>>> under '/files/cms/documents/...'
>>> My goal is to have a web based search with "Spotlight" like search
>>> results categorizing.
>>>
>>> 4. How do I do a search in code if I have the query string?
>>>
>>> Best Regards
>>>
>>> Eirikur S. Hrafnsson, eiki@idega.is
>>> Chief Software Engineer
>>> Idega Software
>>> http://www.idega.com
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>>>
>>>
>> - I want to file a bug report to your parents.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>>
>>
>>
> Best Regards
>
> Eirikur S. Hrafnsson, eiki@idega.is
> Chief Software Engineer
> Idega Software
> http://www.idega.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>
>
- eh, she's cute and has a rack you could mount a server in
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org
Re: How to use Lucene in Slide? A few "easy" questions...
Posted by Eirikur Hrafnsson <ei...@idega.is>.
So when would you use this method you are describing?
On 4.1.2005, at 15:19, Karl Øie wrote:
> Create a class that implements a Indexer or extends LoggableIndexer,
> then configure IndexTrigger in domain.xml to send events to your
> indexer as well as slides own indexer, that uses lucene too. The uri
> parameter tells what location the index should be triggered for.
>
> <listener classname="org.apache.slide.search.IndexTrigger">
> <configuration>
> <indexer classname="YourIndexer" synchronous="false"
> uri="/files/your/path"/>
> </configuration>
> </listener>
>
> Im actually working on doing this right now for my customer so it
> would be nice to discuss this with some one else :-)
>
> Mvh Karl Øie
>
> On 4. jan. 2005, at 15.47, Eirikur Hrafnsson wrote:
>
>> 1. What version of Slide and Lucene do I need to add Lucene indexing
>> to my Slide store? There seems be some Lucene stuff in Slide 2.1...
>>
>> 2. How do I activate the indexing?
>>
>> 3. Can I have seperate indexes for different URI's?
>> E.g. I would like to have one index for my articles (xml based docs)
>> under '/files/cms/articles/....' and possibly a custom indexer
>> (search document)
>> And another index for all other documents (Word,excel,pdf etc.) under
>> '/files/cms/documents/...'
>> My goal is to have a web based search with "Spotlight" like search
>> results categorizing.
>>
>> 4. How do I do a search in code if I have the query string?
>>
>> Best Regards
>>
>> Eirikur S. Hrafnsson, eiki@idega.is
>> Chief Software Engineer
>> Idega Software
>> http://www.idega.com
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>>
>>
> - I want to file a bug report to your parents.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>
>
>
Best Regards
Eirikur S. Hrafnsson, eiki@idega.is
Chief Software Engineer
Idega Software
http://www.idega.com
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org
Re: How to use Lucene in Slide? A few "easy" questions...
Posted by Karl Øie <ka...@gan.no>.
Eh, sorry for my answer, i thought you ment indexing separate from
slides indexing.
Mvh Karl
On 4. jan. 2005, at 16.19, Karl Øie wrote:
> Create a class that implements a Indexer or extends LoggableIndexer,
> then configure IndexTrigger in domain.xml to send events to your
> indexer as well as slides own indexer, that uses lucene too. The uri
> parameter tells what location the index should be triggered for.
>
> <listener classname="org.apache.slide.search.IndexTrigger">
> <configuration>
> <indexer classname="YourIndexer" synchronous="false"
> uri="/files/your/path"/>
> </configuration>
> </listener>
>
> Im actually working on doing this right now for my customer so it
> would be nice to discuss this with some one else :-)
>
> Mvh Karl Øie
>
> On 4. jan. 2005, at 15.47, Eirikur Hrafnsson wrote:
>
>> 1. What version of Slide and Lucene do I need to add Lucene indexing
>> to my Slide store? There seems be some Lucene stuff in Slide 2.1...
>>
>> 2. How do I activate the indexing?
>>
>> 3. Can I have seperate indexes for different URI's?
>> E.g. I would like to have one index for my articles (xml based docs)
>> under '/files/cms/articles/....' and possibly a custom indexer
>> (search document)
>> And another index for all other documents (Word,excel,pdf etc.) under
>> '/files/cms/documents/...'
>> My goal is to have a web based search with "Spotlight" like search
>> results categorizing.
>>
>> 4. How do I do a search in code if I have the query string?
>>
>> Best Regards
>>
>> Eirikur S. Hrafnsson, eiki@idega.is
>> Chief Software Engineer
>> Idega Software
>> http://www.idega.com
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>>
>>
> - I want to file a bug report to your parents.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>
>
- I'm glad I remembered I'm an idiot before I started to set up a wins
proxy.
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org
Re: How to use Lucene in Slide? A few "easy" questions...
Posted by Karl Øie <ka...@gan.no>.
Create a class that implements a Indexer or extends LoggableIndexer,
then configure IndexTrigger in domain.xml to send events to your
indexer as well as slides own indexer, that uses lucene too. The uri
parameter tells what location the index should be triggered for.
<listener classname="org.apache.slide.search.IndexTrigger">
<configuration>
<indexer classname="YourIndexer" synchronous="false"
uri="/files/your/path"/>
</configuration>
</listener>
Im actually working on doing this right now for my customer so it would
be nice to discuss this with some one else :-)
Mvh Karl Øie
On 4. jan. 2005, at 15.47, Eirikur Hrafnsson wrote:
> 1. What version of Slide and Lucene do I need to add Lucene indexing
> to my Slide store? There seems be some Lucene stuff in Slide 2.1...
>
> 2. How do I activate the indexing?
>
> 3. Can I have seperate indexes for different URI's?
> E.g. I would like to have one index for my articles (xml based docs)
> under '/files/cms/articles/....' and possibly a custom indexer (search
> document)
> And another index for all other documents (Word,excel,pdf etc.) under
> '/files/cms/documents/...'
> My goal is to have a web based search with "Spotlight" like search
> results categorizing.
>
> 4. How do I do a search in code if I have the query string?
>
> Best Regards
>
> Eirikur S. Hrafnsson, eiki@idega.is
> Chief Software Engineer
> Idega Software
> http://www.idega.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>
>
- I want to file a bug report to your parents.
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org
Re: Getting my hands on a usable SlideToken
Posted by Karl Øie <ka...@gan.no>.
Yes, i found it in the javadocs, sometime i cant believe myself,
thanks!!!
karl
On 4. jan. 2005, at 16.44, Stefan Lützkendorf wrote:
> A sample for creating a SlideToken you can find in
> org.apache.slide.webdav.util.WebdavUtils.getSlideToken().
> Have you seen this?
>
> Stefan
>
>
> Karl Øie wrote:
>
>> Im trying to write a EntityResolver that is going resolve entities
>> from resources in Slide. This class will run in the same vm as the
>> Domain object and trying to get the SlideToken necessary for
>> performing a content.retrieve(SlideToken st, String uri); The
>> entities will be stored in slide as ent/pen files.
>> How can i obtain a valid SlideToken to use from only the static
>> Domain class? Im a bit lost here.
>> Mvh Karl Øie
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>
> --
> Stefan Lützkendorf -- luetzkendorf@apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>
>
- there is nothing wrong with using linux. if that's the lifestyle you
want to live, i wont judge you. i just wont support you at the parades.
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org
Re: Getting my hands on a usable SlideToken
Posted by Stefan Lützkendorf <lu...@apache.org>.
A sample for creating a SlideToken you can find in
org.apache.slide.webdav.util.WebdavUtils.getSlideToken().
Have you seen this?
Stefan
Karl Øie wrote:
> Im trying to write a EntityResolver that is going resolve entities from
> resources in Slide. This class will run in the same vm as the Domain
> object and trying to get the SlideToken necessary for performing a
> content.retrieve(SlideToken st, String uri); The entities will be stored
> in slide as ent/pen files.
>
> How can i obtain a valid SlideToken to use from only the static Domain
> class? Im a bit lost here.
>
> Mvh Karl Øie
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>
>
--
Stefan Lützkendorf -- luetzkendorf@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org
Re: Getting my hands on a usable SlideToken
Posted by Karl Øie <ka...@gan.no>.
hm, once again i fooled my self by asking before reading... sorry for
that...
karl
On 4. jan. 2005, at 16.30, Karl Øie wrote:
> Im trying to write a EntityResolver that is going resolve entities
> from resources in Slide. This class will run in the same vm as the
> Domain object and trying to get the SlideToken necessary for
> performing a content.retrieve(SlideToken st, String uri); The entities
> will be stored in slide as ent/pen files.
>
> How can i obtain a valid SlideToken to use from only the static Domain
> class? Im a bit lost here.
>
> Mvh Karl Øie
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>
>
- Hacked By Chinese!
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org
Getting my hands on a usable SlideToken
Posted by Karl Øie <ka...@gan.no>.
Im trying to write a EntityResolver that is going resolve entities from
resources in Slide. This class will run in the same vm as the Domain
object and trying to get the SlideToken necessary for performing a
content.retrieve(SlideToken st, String uri); The entities will be
stored in slide as ent/pen files.
How can i obtain a valid SlideToken to use from only the static Domain
class? Im a bit lost here.
Mvh Karl Øie
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org