Fehler in der Websuche?

  • Hallo,


    ich habe einen sehr komischen Effekt bei der Notes-Suche im Web entdeckt. Gestartet wird sie mit der URL


    http://www.domäne.de/datenbank.nsf/suchansicht?SearchView&Query=hallo&SearchOrder=4&SearchMax=250&SearchWV=TRUE&SearchThesaurus=FALSE&count=50&start=1


    Bei der Searchview habe ich bewusst eine Sortierung eingebaut, die mit SearchOrder=4 auch aktiv ist. Wenn ich jedoch den Parameter Count=50 hinzuziehe, um über start=... die Suchergebnisse auf mehrere seiten aufzuteilen, funktioniert die Sortierung plötzlich nicht mehr. Es werden dann pro Seite (also pro 50 Dokumente) von a-z Dokumente angezeigt. Wenn also insgesamt 20 Dokumente mit A beginnen, sind auf der ersten Seite noch fünf vorhanden, dann kommt B usw. Für alle Seiten setzt sich das so fort.


    Auf der Anzeige-Seite ($$SearchTemplateDefault) arbeite ich mit einem $$ViewBody-Feld


    Hat jemand eine Erklärung dafür?


    Gruss, Bernd

    • Offizieller Beitrag

    Dein FT-Index ist aktuell?


    Auf einem Domino 6.5.1 engl. funktioniert es einwandfrei, solange der FT-Index aktuell ist.


    Gruß
    Dirk

    Rein logisches Denken verschafft uns keine Erkenntnis über die wirkliche Welt.
    Alle Erkenntnis der Wirklichkeit beginnt mit der Erfahrung und endet mit ihr.
    Alle Aussagen, zu denen man auf rein logischen Wegen kommt, sind, was die Realität angeht, vollkommen leer.
    Albert Einstein

  • Hallo,


    habe den Beitrag auch in einem anderen Forum gepostet. Dort bekam ich den unten stehenden Workaround. Leider hilft mir der nicht weiter, da ein Großer Teil meiner Dokumente stündlich aktualisiert werden.
    Der Index ist aktuell. Anscheinend ist das wie unten beschrieben ein known Bug, der in den release Notes 6.5b1 dokumentiert ist. Weiss da jemand mehr drüber?


    ____________________________________


    ossible SearchOrder=4 Workaround
    Posted by Vince Mennella on 30.Apr.03 at 12:53 AM using a Web browser
    Category: Domino ServerRelease: All ReleasesPlatform: All Platforms

    For those not familiar with this issue, the Search URL's used with Domino support a parameter to control the sort of search results returned by a query, SEARCHORDER and from the docs...


    SearchOrder=[1,2,3,4]
    Indicate 1 to "Sort by relevance", 2 to "Sort by date ascending", 3 to "Sort by date descending." The default is 1. SearchView also supports a SearchOrder value of 4 to "Keep current order", which sorts the resulting set of documents in the order in which they appear in the view.


    Option 4(Keep Current Order) is misleading and does not work as expected when returning anything less than the full search results on one page. This issue appears in R5 and R6 servers, with no sign of a fix or SPR. Oddly enough, it IS noted in the 6.5b1 Release Notes under SPR TRACKING ID: BFRD4XLMHK - but it is indicated as "not fixed" (If anyone gets tries the beta, please post your findings)



    Proposed Solution


    Here is a proposed workaround we tried for a client running an e-commerce site on Domino.


    Create a view sorted by the desired field and sort order. Then use an agent to loop through all the documents in the view in order, resaving each document as you go, pausing for 2 seconds between saves. Then make sure the FT Index is updated. Now you can use SEARCHORDER=2 in your URLs, which will return your search results in date descending order, which now happens to be the same order as the original sort order of your view.


    Of course, there are many cons to this approach. For example, if your documents are edited frequently, the sort order will be incorrect until the agent can be run again. But for certain situations where documents are relatively static (such as a product catalog), this approach should provide some relief until Lotus decides to get this right.


    An example agent is listed below which looks for a view 'Title' that's alpha sorted by the title field, and then resaves all the docs in the view so that the date descending order matches the view sort order as previously described.



    Vince Mennella
    Cygnus Technologies
    http://www.cygnustech.net


    ==============================================================
    Sub Initialize
    Dim session As New NotesSession
    Dim db As NotesDatabase
    Dim view As NotesView
    Dim entry As NotesViewEntry
    Dim nav As NotesViewNavigator
    Dim doc As NotesDocument


    On Error Goto errHandler


    Set db = session.CurrentDatabase
    Set view = db.GetView("Titles")
    Call view.Refresh
    view.AutoUpdate=False
    Set nav = view.CreateViewNav


    Set entry = nav.Getfirstdocument()


    While Not entry Is Nothing


    Set doc = entry.Document


    Set entry = nav.GetNextDocument(entry)


    doc.timer = Cstr(Timer) 'force a change to the doc
    Call doc.Save(True,False)
    Print doc.title(0)
    Sleep(2)
    Wend


    Sleep(5)


    db.UpdateFTIndex(True)


    Exit Sub


    errHandler:


    Print Cstr(Erl)
    Exit Sub


    End Sub

  • ...und google gibt auch dies hier her. Ein Teil einer Wunschliste von Usern zum Thema: "If I could add ONE feature to Lotus Notes 7.x, it would be..."


    ...


    Re-open and really fix SPR BFRD4XLMHK that was closed as a "user misunderstanding" in Domino 6.51.


    In short, the full text search results on the web are not sorted correctly if you use the &count and &start parameters and you want the results sorted in the same way as the underlying view (&SearchOrder=4 parameter). I've read that this used to work up to a certain version of Domino 5.0.x.


    It would make Notes so much more flexible how search results can be sorted.