asp.net - converting MSIDXS search to Windows Search Service for website -


here's situation: i'm in process of website overhaul public website our company. old site running on server 2003 on .net framework 3.5? may have been built on 2.0 framework matter. anyway, old site had search feature worked nicely users find pages related topics interested in. used old msidxs oledb connection type... simple code follows...

dim odbsearch new system.data.oledb.oledbconnection("provider=""msidxs"";data source=""proto"";") dim cmdsearch new system.data.oledb.oledbcommand cmdsearch.commandtext = string.format("select doctitle, filename, vpath, rank, characterization, size scope() freetext(contents, '{0}') order rank desc", searchtext)  contains(*,'\""" & searchtext & "*\""') , scope='file:c:\...\web_app' order system.itempathdisplay desc 

this worked great. we're moving 2008 r2 server, doesn't have msidxs indexing anymore... or does, doesn't work sites? able turn on, never found anything, , catalog remained empty, , i've read said isn't how searches on sites anymore. 'new way' read using windows search service. i've adjusted service on box 'index' website's directory, , seems have stuff in catalog... however, code i've converted returns 0. new code looks like...

dim odbsearch new system.data.oledb.oledbconnection("provider=search.collatordso.1;extended properties='application=windows';") cmdsearch.commandtext = string.format("select system.title, system.filename, system.itempathdisplay systemindex scope='file:c:\...\web_app'") dim rdrsearch oledbdatareader = cmdsearch.executereader() while rdssearch.read() 

i can't return results. regardless of put in search criteria, jumps right end while.

can tell me piece of puzzle i'm missing?

everything correct; wasn't getting rows because had narrowed systemindex looking @ subdirectory wanted, including scope in clause causing 0 results. took out, search works.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -