cancel
Showing results for 
Search instead for 
Did you mean: 

Search box - alfresco-community-tomcat-2.0.0 and MySQL

sylvain78
Champ in-the-making
Champ in-the-making
Cannot understand why…

I installed alfresco-community-tomcat-2.0.0 on XP following the Readme and the Readme_mysql file to use MySQL.

Seems to be working fine. Now when I simply search "home" (without the quotes), I don't get any results.

I created a "Actors" space and search (All items) for "Actors" (forget all the quotes!) and still no results.  It works for "guest" though.

I know that "home" should at least return "Company Home" and "Guest Home" because it works on another installation I have of alfresco (.war built from SVN sources, mid-february).  Now I cannot reproduce a "working" installation of alfresco.

The problem is the same if I call the repositoryService using the query method.

What am I doing wrong (I have spent way too much time on this now!).

Thanks for your input!
11 REPLIES 11

kevinr
Star Contributor
Star Contributor
Not sure what's happened - but you can easily rebuild the indexes which should fix any index related issue.

1. Stop the server
2. Go to your alf_data directory, and delete the lucene-indexes and backup-lucene-indexes folders.
3. Edit the file tomcat/shared/classes/alfresco/extension/custom-db-connection.properties and set the value: index.recovery.mode=FULL (make sure you remove the '#' comment character from the front)
4. Start the server
5. The indexes will rebuild (takes a few minutes probably)

Hopefully this should fix it,

Kevin

sylvain78
Champ in-the-making
Champ in-the-making
Thanks for your reply Kevin.

I see the index is rebuilt but still have the same problem.
It works fine on an English XP but the problem occurs on a French XP version.

Could it be the locale configuration?  And I don't mean the stop words.
(searching for home doesn't return anything)

Another example of the problem.  I created an Actors, an Actors2 and an Actors3 space.

Searching for actors doesn't work and searching for actors* returns two spaces: Actors2 and Actors3

Still a little bit confused about this…

Thanks!

dnind
Champ in-the-making
Champ in-the-making
I don't have an answer for your query but the logic for your actors query would be:

- Searching for actors: is looking for the exact word actors, therefore actors1, actors2 are different - so only shows actors in the search results

- Searching for actors*: is looking for any indexed term with actors and something else after this.  For me this initially this only showed actors1 and actors2, but after about 20 minutes it showed all three - this may be dependent on when the index is updated/refreshed.

If you searched for actor* it would show all three - actors, actors1, actors2.

I'm not sure whether this is the right behavior from an Alfresco system perspective.

I'm also not sure how much of the lucene search query formats are exposed at present, but some things work and some things don't.  See http://lucene.apache.org/java/docs/queryparsersyntax.html for some examples of lucene search queries.

andy
Champ on-the-rise
Champ on-the-rise
Hi

What is the locale for the client and server? Which locale do you select on login?

Text is tokenised according to the locale in which it was entered. Different locales use different analysers/tokenisers,  they can produce different tokens for the same text. There is no way to be certain tokens generated in one locale will be found by a search in another (unless you specify to search in both locales). The search has to generate/use the same tokens as stored in the index to get a match.

So the most likely issues is that the text was tokenised in one locale and you are looking in another.

You should be able to use the node broswer in admin mode to see the local for company home - but I have not tested this.

Also, with the French tokeniser you will get stemming - this means searches for woof* will match against the stems starting woof (if the stem is woo you will not find it), searches in quotes will use the anyser and stem the query, no quotes will try the token direct. When we support wildcards in tokenised searches (in "" in the lucene world) this will  be better.

Regards

Andy

sylvain78
Champ in-the-making
Champ in-the-making
Thanks for your comments.

In both case, the only locale (in alfresco) is english so I always log in using english.

In fact, the installation files are the same for both installation but the search behavior is different.  I am not using any custom types or custom configuration.  I am just using the default configuration.

I will try on a third computer and see what happens.

sylvain78
Champ in-the-making
Champ in-the-making
I just downloaded and installed  alfresco-community-tomcat-2.0.0.zip on a French Windows XP Service pack 2 laptop.

I installed it as it is using the default alf_data location and using hsqldb.

A search for Home doesn't return anything. (on All Items)
I created a "Home Space" folder and searched for Home again.  Nothing happens.  If I create a "Home" content?  Nothing again.

I added "home" in the content of my "Home" content and it finds it.

It doesn't find some content or folder by name (e.g. search for home) but works for other (e.g. search for guest).

The problem seems to appear on French XP installation.

steve
Champ in-the-making
Champ in-the-making
Hi,

If you are running French XP where you have Alfresco installed then Java will more than likely be running with its locale set as France.
If this is the case, then the Alfresco Server will pick up its locale from Java, and thus be running with a French locale.

When you log on to the Client and select English as the locale, you could be experiencing the issues that Andy has already outlined.

Hope this helps,

Steve

sylvain78
Champ in-the-making
Champ in-the-making
Thanks a lot,

Logging in in french does work.  (I had missed the part about the system locale…)

In order to be able to use it in english, I did the following:

  1. Changed the locale of the jvm: Control Panel => Regional and Language Options => Regional Options Tab => Selected English(US) (no XP restart required)

  2. Rebuilt index upon alfresco server restart: repository.properties => index.recovery.mode=FULL

  3. Logged in in english

This works … but searching for home (All Items) only returns Company Home and Guest Home but doesn't return any of the template files containing "home" in their content (e.g. Company Home/Data Dictionary/Presentation Templates/my_summary.ftl)

I created new content (html) containing "home" and it finds it.  This is close enough!

Thanks again!

andy
Champ on-the-rise
Champ on-the-rise
Hi

Either you have reversed your locale issue 🙂 or the files are not indexed.
You have indexed with the default as English. Some information is persisted about locale.

Can you report the properties that are set on a template you expect to see.
(locale and mimetype are the most interesting)

The templates will be indexes according to the locale set when the files were loaded. Try logging in in french and doing the search and logging in in English and doing the same search.

Cheers

Andy