Multiple Search Indexs Yields Limited Resultset

Suggestions, questions oder problems with regain

Moderator: thtesche

Multiple Search Indexs Yields Limited Resultset

Postby malibu » Sat Jan 30, 2010 2:40 am

Hello All,

I have indexed two separate drives and created 2 separate valid indexes of both. In my SearchConfiguration.xml I created the respective <index> tags as indicated below. When I make a search query using the provided jsp pages I only obtain results from the first index and NOT the second index. The only way for me to get results from the 2nd index is to explicitly pass the argument "index" with a value equal to the name of my second index via the GET request and then of of course I only get results from that 2nd index only. I have tried all the combination of changing my <index> tag without any positive results. The documentation seems to contain less tag attributes than the sample configuration files.

<index name="main" default="true">
<dir>C:\Program Files\Regain\searchindex</dir>
</index>
<index name="example" default="true">
<dir>C:\Program Files\Regain\mike_test_index</dir>
</index>

I am using version 1.6.8 Preview. My question is, how can I have multiple active indexes and get results from all the indexes at the same time when a user does a "global" search?

I am going to try this with the 1.6.6 version and see if that solves it.

Thanks in advance for your assistance.
malibu
 
Posts: 5
Joined: Wed Jan 27, 2010 7:02 pm

Re: Multiple Search Indexs Yields Limited Resultset

Postby malibu » Tue Feb 02, 2010 11:29 pm

FYI,

Well I somewhat answered my own question to this. Although I am not certain if this is the best way to do it yet. Her is my findings which I hope helps others who may have the same question and are not be able to or interested in going through thousands of lines of code...... I barely did myself!

Basically if you have multiple indexes and you want to search through all your indexes then you can construct a U.R.L. where you pass in multiple values for a variable called "index". So if you have an index called "test" and a second index called "bork", you can construct a search form which submits the query to the back end by appending the the following to the GET request so that the request looks something like the following. Since I am new to this forum, it does not allow me to have anything remotely resembling a U.R.L. so in my example I am paraphrasing.


://.......?index=test&index=bork&index=......etc. etc.

It should also work for the POST request as well, but you will have to construct the "index" form variable properly so you can submit multiple values to it, or submit it via AJAX as GET or POST or some such mechanism.

I hope this helps someone out there!
malibu
 
Posts: 5
Joined: Wed Jan 27, 2010 7:02 pm

Re: Multiple Search Indexs Yields Limited Resultset

Postby malibu » Thu Feb 04, 2010 11:57 pm

Hello All,

Additional findings to this post. I am learning more about Regain every day and I hope my findings are useful to anyone with the same questions as me.

I created two indexes as I noted earlier. Each index also has its own unique rewrite rule. I made one the parent of the other in the SearchConfiguration config file. What I observe now is that when I do a search, documents from the two distinct indexes are indeed returned at the same time. This was great news to me.

The issue that I am now experiencing is that the documents returned that are in the child index do not get their paths rewritten. Only the documents from the parent index get their paths rewritten. I verified my rewriting rules were correct by commenting the parent index section. Everything worked fine when there is only one index. Also when I explicitly search the child index by name the path is rewritten correctly. It seems that the problem exists for the case where the results are combined from the two indexes that the results for the second/child index IS NOT rewritten. I am using version 1.6.8

So I am not certain if this is a feature or a bug. I will continue to play around with it and see if I can figure it out. Any input is welcome as always.

Cheers
malibu
 
Posts: 5
Joined: Wed Jan 27, 2010 7:02 pm

08.23.32

Postby ximike2010 » Tue Aug 24, 2010 2:15 am

ximike2010
 
Posts: 301
Joined: Thu Aug 05, 2010 3:40 am

08.23.41

Postby ximike2010 » Sat Aug 28, 2010 6:40 am

ximike2010
 
Posts: 301
Joined: Thu Aug 05, 2010 3:40 am



Return to regain

Who is online

Users browsing this forum: No registered users and 2 guests

cron