[ xnap-Feature Requests-1151815 ] exact phrase, Logic OR, NOT 'search string' support
Brought to you by:
leist
From: SourceForge.net <no...@so...> - 2005-02-25 14:10:08
|
Feature Requests item #1151815, was opened at 2005-02-25 06:10 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=359285&aid=1151815&group_id=9285 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: exact phrase, Logic OR, NOT 'search string' support Initial Comment: For Limewire plugin/Gnutella/Gnutella2 is it very important to filter on searching on the server/host. So it needs a 'search string'. This can filter a lot out. "word word" exact phrase Example: Movie "Bourne Supremacy" OR "Die another Day" NOT porn Operationlist=[Word, OR, NOT]; PSearchstring: PointerToSearchstring; # Forward pointer declaratie struct TSearchstring { Operation: Operationlist; Word: ##0-sign closed string. Next: PSearchstring; } :::: new file void InputSearchstring(Searchstring: String, PointerToPSearchstring); { i: integer; n: integer; n=0 Pn= PSearchstring; repeat { if Searchstring[n] = """ than { ^Pn.Operation = Word; i = 0; repeat i+=1 until Searchstring[n+i]=""" ^Pn.Word = Str(Searchstring, n, (i + 1)) n+=1 } else { if n=0 than { #insert check for length 3 is possible if Str(Searchstring, n, 3) = "OR " { ^Pn.Operation = OR; n+=4 } #insert check for length 4 is possible if Str(Searchstring, n, 4) = "NOT " { ^Pn.Operation = NOT; n+=5; } } else { # insert check for length 4 is possible if Str(Searchstring, n, 4) = " OR " { ^Pn.Operation = NOT; n+= 4; } # insert check for length 5 is possible if Str(Searchstring, n, 5) = " NOT " { ^Pn.Operation = NOT; n+= 6; } } } if Searchstring[n] =! "" and n =! Searchstring.EOF { i = 0; while (n+i) =! Searchstring.EOF | !Searchstring[n+i] = " " i+=1 repeat ^Pn.Operation = word; ^Pn.Word = Str(Searchstring, n, (i +1)) } } if n != 0 than { create ^Pn.Next; #Does this work?? Pn = ^Pn.next; } until n = Searchstring.EOF } ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=359285&aid=1151815&group_id=9285 |