solr - How can I relate search indexes to models in MVC? -


i have mvc application need able search. application modular needs easy modules register data index search module.

at present, there's quick interim solution in place fine flexibility, speed going problem. modules register models (and relationships , columns) they'd searchable. upon search, search functionality queries data using relationships , applies levenshtein, removes stop words, character replacements etc. slow down volume of data increases it's not viable keep select * x,y,z , mine through data.

the benefit of above such there direct relation model found data. example, if model_product finds something, know in code can use model_product::url() associate result off relevant location or model_product::find(other data) show image or description if keyword had been found in title example.

another benefit of above it's database specific, , therefore can thrown onto virtualhost , works.

i have read various options, , seem similar it's unlikely people going able suggest 'right' 1 without inciting discussion or debate, record; following options, solr seems 1 i'm leaning toward. i'm not set in stone if has advice they'd share or other options at, that'd great.

looking through various tutorials , guides seem relatively easy set , configure. in case above can have modules register path of config files/search index models , have searcher run them through search program x. build indexes, , provide means query data. fine.

what don't understand how of these indexes related other code. if index data, search , in turn find result solr, how know how of other information related bit found?

also able confirm whether or not need have instance of of above per virtualhost? can't seem find information on. assume can connect single instance , tell data relevant? connecting single dbms server, credentials x database y.

granted haven't done extensive reading on have typically because i'm bit stuck in terms of direction @ moment , i'd rather not read everything in favour of seeking advice know before take particular route.

edit: this question seems have swayed me more towards solr. there's similar thread here fair amount of insight sphinx.

disclaimer: can speak lucene/solr and, believe, elasticsearch know based on lucene. others might or might not work in same way.

if index data, search , in turn find result solr, how know how of other information related bit found?

you can store data want, e.g. database key pointing particular row in database. lucene/solr can find relative information, e.g. if run dvd rent shop , user has misspelled movie name, lucene figure out , (unlike db) still list closest alternatives. can provide hints boosting fields during indexing or querying. there special extensions geospatial search, etc. , can provide own if need to.

also able confirm whether or not need have instance of of above per virtualhost?

lucene low level library , have present in every jvm run. solr (built on top of lucene) http server. can call many clients want. more scaling options explained here.


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -