Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...weird behavior search engineweird behavior search engine
Previous
 
Next
New Post
5/8/2008 10:29 AM
 

Hi,

i use DNN 4.8 for a small time and i see that the search engine have a weird behavior when it tries to indexing some contents from modules that are included into more than one page.

This is the scenario:

  1. I have the same module  into two page of my portal, so i have two records into TabModule table with the same ModuleID.
  2. Into SearchItem i have the indexed content of this module
  3. When i syndacate (or search) this module content, i have a couple of records into the result of SP "GetSearchItems"

Now, i resolve this with another method into SearchItemCollection class.

this method check if into the SearchItemCollection there is another item with the same ItemId, i past below the code of this method and a little changed that i have made into the method AddRange.

this is my method:

''' <summary>
        ''' Gets a value indicating whether the collection contains the specified <see cref="SearchItemInfo">SearchItemInfo</see>.
        ''' </summary>
        ''' <param name="value">The <see cref="SearchItemInfo">SearchItemInfo</see> to search for in the collection.</param>
        ''' <returns><b>true</b> if the collection contains the specified object; otherwise, <b>false</b>.</returns>
        Public Function ContainsItemId(ByVal value As SearchItemInfo) As Boolean
            ' If value is not of type SearchItemInfo, this will return false.
            Dim retValue As Boolean = False
            If Me.List.Count > 0 Then
                For Each item As SearchItemInfo In Me
                    If item.SearchItemId = CType(value, SearchItemInfo).SearchItemId Then
                        retValue = True
                        Exit For
                    End If
                Next
            End If
            Return retValue
        End Function    'Contains

A little change that i have made to the AddRange Method:

 ''' <summary>
        ''' Copies the elements of the specified arraylist to the end of the collection.
        ''' </summary>
        ''' <param name="value">An arraylist of type <see cref="SearchItemInfo">SearchItemInfo</see> containing the objects to add to the collection.</param>
        Public Sub AddRange(ByVal value As ArrayList)
            For Each obj As Object In value
                If TypeOf obj Is SearchItemInfo And Not ContainsItemId(CType(obj, SearchItemInfo)) Then
                    Add(CType(obj, SearchItemInfo))
                End If
            Next
        End Sub

Another way to resolve this bug? or weird behavior?

One of this could be change the SP GetSearchItems, but for now don't want to do this.

Bye

Gabriele

p.s. Sorry for my english

 

 

 

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...weird behavior search engineweird behavior search engine


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out