plainblack.com
Username Password
search
Bookmark and Share

Advanced search wobject

Advanced Search functionality for WebGUI

Description:

This package adds advanced (google like) search functionality to your WebGUI site.

Key features:

  • Uses an index rather than searching on the life data.
  • Support for highlighting of search results.
  • Support for context preview.
  • Shows results ordered on "best match".
  • Supports must include, can include, and cannot include words and phrases.
  • Support for boolean (AND/OR) queries.
  • Support for stop words and stemming.
  • Integrates with WebGUI's permission system.
  • Extendible.
  • Templatable.
  • Fast.

Examples

The German community site is running this Search wobject. You can check it out here. (german only). Here's another site using the advanced search wobject.

Download

Most recent version:

Older versions:

Installation

Please refer to the docs/Search/install.txt file for detailed installation instructions.

Credits (In no particular order)

  • Andreas Graf for beta testing and feedback
  • JT for the high volume test database, and his advice.
  • Leendert Bottelberghs for his feedback.
  • Tomas Styblo for his HTML::Highlight module and his patch on a bug found while developing this wobject.
  • T.J. Mather for the DBIx::FullTextSearch module, where this wobject is build upon.

Support

This package comes without any warranty. Support is provided on "best effort" basis. If you've any questions, ideas, suggestions, whatever, please post them on the discussion forum in this thread.

Todo

  • Online Help for this wobject. - done
  • Fix a template bug (tnx Edv) - done
  • Do something with Date created / date modified.
  • Configurable Exclude pages.
  • More templates (Search in discussion, etc).

System RequirementsPlease be advised: this contribution was tested with something older than WebGUI 7.5. When this contribution was uploaded there was no field for the author to fill out regarding it's requirements.
Comments
4edv: "That's great to hear!  How about adding support to search attachments and collateral to your wobject?  

I was just contemplating how to improve search while performing household chores this morning...  I'm working on an enhanced file manager with folder, file versions, and privileges (groupToView/Edit) support.  I'd like to also add search support for the file's content.

Not sure how to fit it in with the WebGUI architecture...  Perhaps a modification of the attachment process that does a text conversion on binary files (e.g., pdf2text, strings, etc.) during upload so that they can be indexed by your search wobject...?

Thanks,"
4fishingfan: "
Hi Len

I think what you are doing is a good idea.  I'd be interested to know how you are progressing on the searching of the userProfileData.

I'm currently working on a wobject that has a similar data model to this and was going to add a search ability to this.  Currently this is in my 'to do list' as I was getting the rest of the functionality working first.

Chris
"
4bottelberghs: "Hi len,

I just started coding on a simple search wobject, that could replace the current search facilities and would be templatable. Nothing fancy, but an effective replacement for simple needs. The only extra feature I added was that you would be able to select namespaces to search through. Having seen your plans, I'd almost drop my work completely, althought it's nearly finished.
I would be glad to help you in the finishing part of your work, help you with some coding or testing etc. All credits come to you of course.
Le me know...

Leendert"
4len: "
> I'd be interested to know how you are progressing on the searching of the userProfileData.

The indexing part is finished. Profile data is indexed only if profile is visible.

The user's language is saved as well, so if you're looking for italian content only profiles of italian users will appear.

The config data is merged, then indexed. Detailed searches like "I'm looking for a 25 year old french female" are not possible. However searches like "gender female AND icq" will work (I hope )

Len Kranendonk
www.primaat.com
"
4JT: "You should also know that the entire attachment system in WebGUI is being refactored in 6.x so adding such support now would not be"
3len: "
--- (Edited at 9/21/2003 08:16:43 by len) ---


Support for indexing attachments and collateral is not implemented at the moment, but can be added later.

The indexDocument method only handles text, so binary files need to be converted. 

We could add methods like indexPdf, indexMp3, indexDoc, indexXls etc. to the IndexedSearch class. These methods will handle the conversion and caching of the converted content.

File conversion can't be done in a platfrom independent way. Also, you need 3th party conversion tools which makes the installation more difficult.

This is the documentation for the indexDocument method:
indexDocument ( hashRef )
Adds a document to the index.

This method doesn't store the document itself. Instead, it stores information about words in the document in such a structured way that it makes easy and fast to look up what documents contain certain words and return the Id's of the documents.
text
The text to index.


location
The location of the document. Most likely an URL.


docId
The unique Id of this document. Defaults to the next empty docId.


pageId
The pageId of the page on which this document resides. Defaults to 0.


wobjectId
The wobjectID of the wobject that holds this document. Defaults to 0.


languageId
The languageId of this document. Defaults to 1 (English).


namespace
The namespace of this document. Defaults to 'WebGUI'.


page_groupIdView
Id of group authorized to view this page. Defaults to '7' (everyone)


wobject_groupIdView
Id of group authorized to view this wobject. Defaults to '7' (everyone)


wobject_special_groupIdView
Id of group authorized to view the details of this wobject.


headerShortcut
An sql statement that returns the header (title, question, subject, name, whatever) of this document.


bodyShortcut
An sql statement that returns the body (description, answer, message, whatever) of this document.






Len Kranendonk
www.primaat.com
"
4aaronp: "Excellent job!  I would really like to see the template API.  Is there a way to define how much of the sample page text is displayed?"
4edv: "Len,

I noticed that the Advanced Search Template doesn't include wobject name and description at top.  Not a problem to cut and paste it from the default, but didn't know if you wanted to update your code for distribution.

--Ed"
4edv: "Len,

This is an RFE to allow the text color of the highlights to specified.  The yellow search result highlight makes the gold text in the initial WebGUI 5 style unreadable.

Thanks,"
4len: "
Will include it in the next release. Thanks for reporting it.

Len
"
2len: "
Okay Ed, let's do some black magic:
Drink a Put on your Open a browser and start WebGUI
Stare at the admin bar and wish the Highlight colors are configurable Open the search wobject properties
Click on Layout
Feel the spiritual power and look what has happened  
Len
"
4len: "This one I can't solve with black magic so I'll radiate it to you in a next"
2edv: "Doh. OK, idiot I am.  Let me see how to save face...  How about having the search wobject specify text color 1 right above highlight color 1 with a high contrast default?  No?  OK."
4edv: "BTW, that was a pretty funny response on your part.  I actually laughed out"
4djs: "but it does not exist in that directory or anywhere in the tar"
2djs: "
Ah - I see - that is a little confusing when the file name in step 3 does not match the actual file name on the next line or the directory.

 

Sorry.
"
3djs: "
When I run buildIndex.pl I get the error: "Can't locate Parse/RecDescent.pm ... in @INC at FullTextSearch.pm line 11."

What would be the CPAN command line to pull this module down?

Thanks,

D.
"
2djs: "
When I run buildIndex.pl I get the error: "Can't locate Parse/RecDescent.pm ... in @INC at FullTextSearch.pm line 11."

What would be the CPAN command line to pull this module down?

Thanks,

D.
"
4djs: "I mis-understood the "Search Through" section when configuring an advanced search wobject.  When I deselected all options the search object configured, but then got a server error when trying to process a search - would be cool to have this edit checked when saving the object for stupid people like"
4len: "perl -MCPAN -e "install"
4IRV: "
Len nice wobject!!!

Only 1 suggestion though.  Searches sometimes return more than 1 result per page.

For example.  On the following site do a search for "mission".
http://www.tnics.com/search

I've also noticed that the default webgui search does the same.  This is somewhat annoying.

Anyway, nice work, and good luck winning the contest!!

IRV
"
4len: "
Ola IRV,

Muchas gracias para la estupenda reacion.

Suppose you have a page called "mission", and on that page an article titled "mission". The Search will return 2 hits if you search for "mission": one for the page, and one for the article. It are 2 different "objects".

You can configure what is searched (the "Search through" option) and uncheck pages. The page "object" doesn't contain much information (unless you fill in the Synopsis field consistently), so it doesn't matter much if the page itself is not returned in the results.

Len Kranendonk
www.primaat.com
"
4IRV: "
Ah sí, buena suerte!

For some reason I can't post a reply to the messages here.

Len, I don't see that option to prevent pages from being searched. 

Thanks!
IRV


"
4colink: "In the default templates for Search the variable int.search is used,
but I can't find that particular variable, or the int.* syntax
documented anywhere.  Is that a standard WebGUI variable convention?"
2colink: "After grepping through the various wobjects in my lib directory I
found that it looks like it just didn't get documented in the help
system.  So I tried modifying the upgrade.sql script to add it
to my system as a precursor test to a patch.  The SQL works, it
shows up when I manually examine the table, but it never shows up
in the Help page for the Search Template.

Would it be okay if I sent you the SQL script?"
4colink: "The modified help not showing up must have been a browser problem,
since it's there this morning on my site.

The patch, if you're interested, is below:


# Add description of int.search template variable
#
# To apply this patch:
# STEP 1: Chdir to the source directory.
# STEP 2: Run the 'applypatch' program with this patch file as input.
#
# If you do not have 'applypatch', it is part of the 'makepatch' package
# that you can fetch from the Comprehensive Perl Archive Network:
# http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz
# In the above URL, 'x' should be 2 or higher.
#
# To apply this patch without the use of 'applypatch':
# STEP 1: Chdir to the source directory.
# STEP 2: Run the 'patch' program with this file as input.
#
#### End of Preamble ####

#### Patch data follows ####
diff -c 'Search.orig/create_search.sql' 'Search/create_search.sql'
Index: ./create_search.sql
*** ./create_search.sql    Sat Jan 10 14:31:21 2004
--- ./create_search.sql    Sat Jan 10 14:31:30 2004
***************
*** 121,126 ****
 INSERT INTO international VALUES (7,'Search',3,'Alleen resultaten van',1068830378,NULL);
 INSERT INTO international VALUES (8,'Search',3,'Alleen resultaten in bereik',1068830393,NULL);
 INSERT INTO international VALUES (9,'Search',3,'Alleen resultaten in taal',1068830408,NULL);
! INSERT INTO international VALUES (28,'Search',1,'\r\n
This is the list of template variables available for \r\nsearch templates:
\r\n
query
Contains the value of the query form \r\nvariable.
The allWords, atLeastOne, exactPhrase \r\nand without values are appended to this variable.
\r\n
queryHighlighted
Same as query but \r\nhighlighted.
\r\n
allWords
Contains the value of the allWords form \r\nvariable.
\r\n
atLeastOne
Contains the value of the atLeastOne \r\nform variable.
\r\n
exactPhrase
Contains the value of the \r\nexactPhrase form variable.
\r\n
without
Contains the value of the without form \r\nvariable.
\r\n
duration
The duration of the search process in seconds. \r\n
\r\n
numberOfResults
The number of results.
\r\n
startNr
The number of the first search result on the \r\npage.
\r\n
endNr
The number of the last search result on the \r\npage.
\r\n
submit
A form button with the word \"Search\" printed on \r\nit.
\r\n
wid
The wobject Id of this wobject.
\r\n
resultsLoop
A loop containing the search results. Inside \r\nthe loop the following template variables are available:
\r\n\r\n
username
The username of the person that created this \r\nsearch result.
\r\n
ownerId
The Id of the person that created this search \r\nresult.
\r\n
userProfile
An url to the profile of the creator of this \r\nsearch result.
\r\n
header
The title of the search result. (This can be the \r\nsubject of a message, the question of a FAQ, the title of an Article, etc)
\r\n
body
A preview of the content of the search result.
\r\n
namespace
The namespace in which this search result \r\nresides.
\r\n
location
The URL of this search result.
\r\n
crumbtrail
A crumbtrail to this search result.
\r\n
contentType
The type of this search \r\nresult.
\r\n
The loops contentTypes, \r\ncontentTypesSimple, languages, \r\nnamespaces and users all look the same. \r\nThey can be used to create a select list, radio list or check list so users can \r\nrefine their search.
\r\n
This tempate variables are available inside the loops:
\r\n\r\n
name
The (possibly internationalized) name of the \r\noption.

value
The value of the \r\noption.

selected
A conditional indicating whether \r\nthis option is selected or not.
\r\n
firstPage
A link to the first page in the paginator. \r\n
lastPage
A link to the last page in the paginator. \r\n
nextPage
A link to the next page forward in the paginator. \r\n
previousPage
A link to the next page backward in the paginator. \r\n
pageList
A list of links to all the pages in the paginator. \r\n
multiplePages
A conditional indicating whether there is more than \r\none page in the paginator. \r\n
isFirstPage
A conditional indicating whether the visitor is viewing \r\nthe first page. \r\n
isLastPage
A conditional indicating whether the visitor is viewing \r\nthe last page.
',1070202325,'');
 INSERT INTO international VALUES (29,'Search',1,'Search template',1070202588,'');
 
--- 121,126 ----
 INSERT INTO international VALUES (7,'Search',3,'Alleen resultaten van',1068830378,NULL);
 INSERT INTO international VALUES (8,'Search',3,'Alleen resultaten in bereik',1068830393,NULL);
 INSERT INTO international VALUES (9,'Search',3,'Alleen resultaten in taal',1068830408,NULL);
! INSERT INTO international VALUES (28,'Search',1,'\r\n
This is the list of template variables available for \r\nsearch templates:
\r\n
query
Contains the value of the query form \r\nvariable.
The allWords, atLeastOne, exactPhrase \r\nand without values are appended to this variable.
\r\n
queryHighlighted
Same as query but \r\nhighlighted.
\r\n
allWords
Contains the value of the allWords form \r\nvariable.
\r\n
atLeastOne
Contains the value of the atLeastOne \r\nform variable.
\r\n
exactPhrase
Contains the value of the \r\nexactPhrase form variable.
\r\n
without
Contains the value of the without form \r\nvariable.
\r\n
duration
The duration of the search process in seconds. \r\n
\r\n
numberOfResults
The number of results.
\r\n
startNr
The number of the first search result on the \r\npage.
\r\n
endNr
The number of the last search result on the \r\npage.
\r\n
submit
A form button with the word \"Search\" printed on \r\nit.
\r\n
int.search
The name of this wobject.
\r\n
wid
The wobject Id of this wobject.
\r\n
resultsLoop
A loop containing the search results. Inside \r\nthe loop the following template variables are available:
\r\n\r\n
username
The username of the person that created this \r\nsearch result.
\r\n
ownerId
The Id of the person that created this search \r\nresult.
\r\n
userProfile
An url to the profile of the creator of this \r\nsearch result.
\r\n
header
The title of the search result. (This can be the \r\nsubject of a message, the question of a FAQ, the title of an Article, etc)
\r\n
body
A preview of the content of the search result.
\r\n
namespace
The namespace in which this search result \r\nresides.
\r\n
location
The URL of this search result.
\r\n
crumbtrail
A crumbtrail to this search result.
\r\n
contentType
The type of this search \r\nresult.
\r\n
The loops contentTypes, \r\ncontentTypesSimple, languages, \r\nnamespaces and users all look the same. \r\nThey can be used to create a select list, radio list or check list so users can \r\nrefine their search.
\r\n
This tempate variables are available inside the loops:
\r\n\r\n
name
The (possibly internationalized) name of the \r\noption.

value
The value of the \r\noption.

selected
A conditional indicating whether \r\nthis option is selected or not.
\r\n
firstPage
A link to the first page in the paginator. \r\n
lastPage
A link to the last page in the paginator. \r\n
nextPage
A link to the next page forward in the paginator. \r\n
previousPage
A link to the next page backward in the paginator. \r\n
pageList
A list of links to all the pages in the paginator. \r\n
multiplePages
A conditional indicating whether there is more than \r\none page in the paginator. \r\n
isFirstPage
A conditional indicating whether the visitor is viewing \r\nthe first page. \r\n
isLastPage
A conditional indicating whether the visitor is viewing \r\nthe last page.
',1070202325,'');
 INSERT INTO international VALUES (29,'Search',1,'Search template',1070202588,'');
 
diff -c 'Search.orig/upgrade_1.3-1.4.sql' 'Search/upgrade_1.3-1.4.sql'
Index: ./upgrade_1.3-1.4.sql
*** ./upgrade_1.3-1.4.sql    Sat Jan 10 14:31:21 2004
--- ./upgrade_1.3-1.4.sql    Sat Jan 10 14:31:36 2004
***************
*** 82,87 ****
 INSERT INTO international VALUES (7,'Search',3,'Alleen resultaten van',1068830378,NULL);
 INSERT INTO international VALUES (8,'Search',3,'Alleen resultaten in bereik',1068830393,NULL);
 INSERT INTO international VALUES (9,'Search',3,'Alleen resultaten in taal',1068830408,NULL);
! INSERT INTO international VALUES (28,'Search',1,'\r\n
This is the list of template variables available for \r\nsearch templates:
\r\n
query
Contains the value of the query form \r\nvariable.
The allWords, atLeastOne, exactPhrase \r\nand without values are appended to this variable.
\r\n
queryHighlighted
Same as query but \r\nhighlighted.
\r\n
allWords
Contains the value of the allWords form \r\nvariable.
\r\n
atLeastOne
Contains the value of the atLeastOne \r\nform variable.
\r\n
exactPhrase
Contains the value of the \r\nexactPhrase form variable.
\r\n
without
Contains the value of the without form \r\nvariable.
\r\n
duration
The duration of the search process in seconds. \r\n
\r\n
numberOfResults
The number of results.
\r\n
startNr
The number of the first search result on the \r\npage.
\r\n
endNr
The number of the last search result on the \r\npage.
\r\n
submit
A form button with the word \"Search\" printed on \r\nit.
\r\n
wid
The wobject Id of this wobject.
\r\n
resultsLoop
A loop containing the search results. Inside \r\nthe loop the following template variables are available:
\r\n\r\n
username
The username of the person that created this \r\nsearch result.
\r\n
ownerId
The Id of the person that created this search \r\nresult.
\r\n
userProfile
An url to the profile of the creator of this \r\nsearch result.
\r\n
header
The title of the search result. (This can be the \r\nsubject of a message, the question of a FAQ, the title of an Article, etc)
\r\n
body
A preview of the content of the search result.
\r\n
namespace
The namespace in which this search result \r\nresides.
\r\n
location
The URL of this search result.
\r\n
crumbtrail
A crumbtrail to this search result.
\r\n
contentType
The type of this search \r\nresult.
\r\n
The loops contentTypes, \r\ncontentTypesSimple, languages, \r\nnamespaces and users all look the same. \r\nThey can be used to create a select list, radio list or check list so users can \r\nrefine their search.
\r\n
This tempate variables are available inside the loops:
\r\n\r\n
name
The (possibly internationalized) name of the \r\noption.

value
The value of the \r\noption.

selected
A conditional indicating whether \r\nthis option is selected or not.
\r\n
firstPage
A link to the first page in the paginator. \r\n
lastPage
A link to the last page in the paginator. \r\n
nextPage
A link to the next page forward in the paginator. \r\n
previousPage
A link to the next page backward in the paginator. \r\n
pageList
A list of links to all the pages in the paginator. \r\n
multiplePages
A conditional indicating whether there is more than \r\none page in the paginator. \r\n
isFirstPage
A conditional indicating whether the visitor is viewing \r\nthe first page. \r\n
isLastPage
A conditional indicating whether the visitor is viewing \r\nthe last page.
',1070202325,'');
 INSERT INTO international VALUES (29,'Search',1,'Search template',1070202588,'');
 
--- 82,87 ----
 INSERT INTO international VALUES (7,'Search',3,'Alleen resultaten van',1068830378,NULL);
 INSERT INTO international VALUES (8,'Search',3,'Alleen resultaten in bereik',1068830393,NULL);
 INSERT INTO international VALUES (9,'Search',3,'Alleen resultaten in taal',1068830408,NULL);
! INSERT INTO international VALUES (28,'Search',1,'\r\n
This is the list of template variables available for \r\nsearch templates:
\r\n
query
Contains the value of the query form \r\nvariable.
The allWords, atLeastOne, exactPhrase \r\nand without values are appended to this variable.
\r\n
queryHighlighted
Same as query but \r\nhighlighted.
\r\n
allWords
Contains the value of the allWords form \r\nvariable.
\r\n
atLeastOne
Contains the value of the atLeastOne \r\nform variable.
\r\n
exactPhrase
Contains the value of the \r\nexactPhrase form variable.
\r\n
without
Contains the value of the without form \r\nvariable.
\r\n
duration
The duration of the search process in seconds. \r\n
\r\n
numberOfResults
The number of results.
\r\n
startNr
The number of the first search result on the \r\npage.
\r\n
endNr
The number of the last search result on the \r\npage.
\r\n
submit
A form button with the word \"Search\" printed on \r\nit.
\r\n
int.search
The name of this wobject.
\r\n
wid
The wobject Id of this wobject.
\r\n
resultsLoop
A loop containing the search results. Inside \r\nthe loop the following template variables are available:
\r\n\r\n
username
The username of the person that created this \r\nsearch result.
\r\n
ownerId
The Id of the person that created this search \r\nresult.
\r\n
userProfile
An url to the profile of the creator of this \r\nsearch result.
\r\n
header
The title of the search result. (This can be the \r\nsubject of a message, the question of a FAQ, the title of an Article, etc)
\r\n
body
A preview of the content of the search result.
\r\n
namespace
The namespace in which this search result \r\nresides.
\r\n
location
The URL of this search result.
\r\n
crumbtrail
A crumbtrail to this search result.
\r\n
contentType
The type of this search \r\nresult.
\r\n
The loops contentTypes, \r\ncontentTypesSimple, languages, \r\nnamespaces and users all look the same. \r\nThey can be used to create a select list, radio list or check list so users can \r\nrefine their search.
\r\n
This tempate variables are available inside the loops:
\r\n\r\n
name
The (possibly internationalized) name of the \r\noption.

value
The value of the \r\noption.

selected
A conditional indicating whether \r\nthis option is selected or not.
\r\n
firstPage
A link to the first page in the paginator. \r\n
lastPage
A link to the last page in the paginator. \r\n
nextPage
A link to the next page forward in the paginator. \r\n
previousPage
A link to the next page backward in the paginator. \r\n
pageList
A list of links to all the pages in the paginator. \r\n
multiplePages
A conditional indicating whether there is more than \r\none page in the paginator. \r\n
isFirstPage
A conditional indicating whether the visitor is viewing \r\nthe first page. \r\n
isLastPage
A conditional indicating whether the visitor is viewing \r\nthe last page.
',1070202325,'');
 INSERT INTO international VALUES (29,'Search',1,'Search template',1070202588,'');
 
#### End of Patch data ####

#### ApplyPatch data follows ####
# Data version        : 1.0
# Date generated      : Sat Jan 10 14:31:52 2004
# Generated by        : makepatch 2.00
# Recurse directories : Yes
# p 'create_search.sql' 23980 1073773890 0100644
# p 'upgrade_1.3-1.4.sql' 13769 1073773896 0100644
#### End of ApplyPatch data ####

#### End of Patch kit [created: Sat Jan 10 14:31:52 2004] ####
#### Checksum: 68 18828 34458 ####"
4n2767554: "Can't get advanced saerch wobject to work on win32 platform. When i attempt to insert the wobject webgui.log gives a WARNING: Could not use wobject search because: Can't locate object method "new" via package "WebGUI::Wobject::search" (perhaps you forgot to load "WebGUI::Wobject::search"?).  Any"
4borisg: "
Len,

Once I imported and verified a batch of new users into WG 5.5.4 and run buildIndex.pl on the appropriate db, I tried to search user profiles for new user names. This search produced no result.

Only after I resaved some of the user profiles and reran buildIndex.pl, resaved user data appeared as search result.

I also noticed that when I ran buildIndex.pl for the first time it displayed "Indexing userProfileData data (35 items) ...", even though there were ~100 users added via usersImport.pl. After I resaved 2 user profiles a got "Indexing userProfileData data (37 items) ..."

Any thoughts?

Thanks
"
4edv: "Len,

I am running your search 1.4 under 5.5.4 and seem to be experiencing a problem with the pageList feature.  

I have a Advanced Search wobject that is configured to limit its result set to a specific root.  It appears that the re-indexing is occurring properly.  However, the result set doesn't show "new" pages' content unless I manually resave the wobject.  I assume this updates the pageList column of the Search table.

Is this the intended functionality or am I missing something?  Should the buildIndex.pl script also update the pageList?

Thanks,

Ed
Thanks,"
4gecon: "
Hello all

This WObject looks great! Any ideas on how to make it work for other character sets/locales, too?

I'm interesting in having a bilingual site (greek+english), but now only english words are working...

 

Thank you in advance,

Regards...
"
4bardo: "Hi!

I using the AdvancedSearch in the very big site(lot of documnets in the server).

The buildIndex.pl put the following errors(many times):
DBD::mysql::db do failed: Duplicate entry '65535' for key 1 at ../lib/DBIx/FullTextSearch/Phrase.pm line 96.

I think that This error means the word index is too little int. (use smallint(5)).

The site language is Hungarian.

What do you think?"
4zionchu: "
why can I search chinese words by advanced search? I 've bought the Rulling WebGUI document ,and read it carefully ,but still can not find the way solve the problem.

I tried following way:

first ,set up the webgui5.5.8 on windowsXP;and turn to chinese language version;

secondly,install the Advanced search wobjects step by step,and it works !

step3,search for word "home" (in chinese),but get nothing;search for word "home" (in english),find the home page.

why????

Our work group are working for a project sponsored by China MOE ,it's very important!

hurrrrrry!!!!!!

Thanks !!!! 
"
3pvanthony: "Thank you very much for the advance search wobject in WebGUI. It is


really useful.



I need to make a small modification.



When I do a search, I do want the results of restricted pages to show.


So I made a small change. Please note that I am not a software writer.



I made the following change.



At line 651 in IndexedSearch.pm I commented out the following.



#$sql .= " and page_groupIdView in ($groups)";


#$sql .= " and wobject_special_groupIdView in ($groups)";


#if ($session{setting}{wobjectPrivileges}) {


#       $sql .= " and wobject_groupIdView in ($groups)";


#}



It worked but I know that this is not the right way, so I did some more


changes.



At line 50 in Search.pm I added the following.



WithPermission=>{


           fieldType=>'yesNo',


           defaultValue=>1


                   },



and at line 133,



$properties->yesNo( -name=>'WithPermission',


                         
-label=>"Obey Permissions",

                         
-value=>$self->getValue("WithPermission")


                     );



plus added a feild named "WithPermission" in the Search table.



Up to here it is working and it is updating the Search table.



I would like to know what I am doing is ok.



Next how to add an if block for the following. I failed when I tried this.



if(getValue("WithPermission") == 1){



                 
$sql .= " and page_groupIdView in ($groups)";


                 
$sql .= " and wobject_special_groupIdView in ($groups)";


                 
if ($session{setting}{wobjectPrivileges}) {

                       
$sql .= " and wobject_groupIdView in ($groups)";


                  }


                 }



Any advice is much appreciated.



I am using WebGUI version 5.5.8 on Linux.



P.V.Anthony"
4praveenalla: "

Hi,

When I try to install this search wobject I am getting an
error saying " international table doesnt exist in database" . I am
using WebGUI version 6.2.7. Please help me if you have faced this
problem.

Thanks,

Praveen 

 

 

"
Downloadsearch-1.4-for-webgui-5.5.x-tar.gz search-1.4-for-webgui-5.5.x-tar.gz
LinksNo Support Offered
Statistics Downloads: 432
Views: 13482
Rating: 4
Updated: 8/12/2005
Keywords Assets
NavigationBack to the Bazaar
© 2018 Plain Black Corporation | All Rights Reserved