This essay mainly raises questions. I cannot solve the problems.
Many of my friends who care about dotnetnuek are paying attention to her.
However, as we continue to feel gratified by the step-by-step growth of dnn3, we also find that it is still far from the needs of our Chinese users.
The biggest headache is Chinese search,
There have been no results for searching with Chinese keywords for a long time, or there are only a few results
I began to find this problem, but I didn't care much about it until 3.0.12 came out. the problem still exists, because 3.0.12 is no longer Bata, and 3.0.13 will be launched soon, chinese search is not considered officially
Why can't I search for Chinese Characters in English?
After a closer look, I found that the dotnetnuke search function is implemented using searchproviders. However, if searchdatastore provides the keyword search function, the problem must be solved here.
As a test, I first added some Chinese content to my dnn site, then re-opened the searchword table using search management under the host, we found that some Chinese content has been added in, but words that serve as keywords/searchable content are not what we need, for example, "How to Deal with Chinese search", "add content", "Chinese search has heard problems", and "test" are all the Chinese statements I have entered to test, at the same time, the entered English content is quite normal. "Chinese" test ", the content in the input quotation marks can produce the search results. In this way, you can basically judge that the problem occurs in the process of generating keywords, the stored procedure for adding content to the searchword table is addsearchword. Who calls addsearchword? The final error is located
Searchdatastore. VB's 117 rows
L116 ~ L134
'Split content into words
Dim Contentwords () As String = Split (Content, " " )
' Process each word
Dim Intword As Integer
Dim Strword As String
For Each Strword In Contentwords
If Canindexword (strword, language) Then
Intword = Intword + 1
If Indexwords. containskey (strword) = False Then
Indexwords. Add (strword, 0 )
Indexpositions. Add (strword, 1 )
End If
' Track number of occurrences of word in content
Indexwords (strword) = Ctype (Indexwords (strword ), Integer ) + 1
' Track positions of word in content
Indexpositions (strword) = Ctype (Indexpositions (strword ), String ) & " , " & Intword. tostring
End If
Next
As you can see, foreigners can easily split the content by spaces, and then search. Of course, there is no problem, but Chinese cannot be separated by spaces, therefore, a sentence connected together becomes a "keyword.
The possible solution to this problem is:
1. Perform Chinese Word Segmentation and index the content of Chinese or Chinese/English Mixture
2. Develop a new searchprovider
All of the above are simple comments. They are inaccurate and incorrect. Please kindly advise.
According to the instruction of Baoyu, use the Temporary method and use like to query
Use% Chinese %
In addition, execute the following commands in host-> SQL:Code
Alter Procedure DBO. getsearchresults
@ Portalid Int ,
@ Word Nvarchar ( 100 )
As
Select Si. searchitemid,
Sw. Word,
SiW. occurrences,
SiW. occurrences + 1000 As Relevance,
M. moduleid,
TM. Tabid,
Si. title,
Si. description,
Si. Author,
Si. pubdate,
Si. searchkey,
Si. guid,
Si. imagefileid,
U. firstname + ' ' + U. lastname As Authorname
From Searchword SW
Inner Join Searchitemword SiW On Sw. searchwordsid = SiW. searchwordsid
Inner Join Searchitem Si On SiW. searchitemid = Si. searchitemid
Inner Join Modules m On Si. moduleid = M. moduleid
Left Outer Join Tabmodules TM On Si. moduleid = TM. moduleid
Inner Join Tabs t On TM. Tabid = T. Tabid
Left Outer Join Users u On Si. Author = U. userid
Where
(M. startdate Is Null ) Or ( Getdate () > M. startdate )) And (M. enddate Is Null ) Or ( Getdate () < M. enddate )))
And (T. startdate Is Null ) Or ( Getdate () > T. startdate )) And (T. enddate Is Null ) Or ( Getdate () < T. enddate )))
And (SW. Word Like @ Word)
And (T. isdeleted = 0 )
And (M. isdeleted = 0 )
And (T. portalid = @ Portalid)