I was able to import data through solr DIH.
In my database I have 4 tables:
threads: id, user_id, country_id
tags: id
thread_tag_map: thread_id, tag_id
countries: id
posts: id, thread_id
i want each document in solr to consist of:
thread_id
tag_id
country_id
post_id
for example:
thread_id: 1
tag_id: 23
tag_id: 34
country_id: ...
I have a Hibernate search that searches from many a field of an object. Is it possible to know which of the fields matched the results for each result object?
...
i have two fields:
title
body
and i want to search for two words
dog
OR
cat
in each of them.
i have tried q=*:dog OR cat
but it doesnt work.
how should i type it?
PS. could i enter default search field = ALL fields in schema.xml in someway?
...
I am using PHP to access Solr and I wonder one thing.
Why should I use Solr PHP client when I can use:
$serializedResult = file_get_contents(
'http://localhost:8983/solr/select?q=niklas&wt=phps');
to get the result in arrays and then print them out? I don't really get the difference. Are there any richer fe...
with solr php client you can get results from solr.
if ($results)
{
$total = (int) $results->response->numFound;
$start = min(1, $total);
$end = min($limit, $total);
echo "Visar: " . $start . " - " . $end . " av " . $total . "<br />";
// iterate result documents
foreach ($results->response->docs as $doc)
{
<<...
when i do a standard search it just search for one field type.
$results = $solr->search($query, $offset, $limit);
when i try this:
$params = array('qf' => 'threads.title posts.body');
$results = $solr->search($query, $offset, $limit, $params);
it still doesnt work.
any idea?
...
i use solr php client.
but when i use the search method:
$params = array('qf' => 'threads.title posts.body', 'defType' => dismax);
$results = $solr->search($query, $offset, $limit, $params);
when i use defType = dismax it searches $query = 'Peter Jakob' as the whole string instead of Peter OR Jakob. it works fine when i dont use the...
Ive got a problem. In each document I've got fields: threads.id and posts.id.
I want to get the field name value for them so i can get data from the database.
Between the lines beneath i have marked the lines where i want to get the fields.
But it returns error because they are $doc is object.
How can i get the fields? I have to do i...
We're working in EFv1 and I'm implementing a search control with several filter options. Most of them I translate into .Where clauses and that is ok with EF.
But there is one specific filter that can make my application run very slow: text search. The column in the database has a corresponding entity property in my EF model, but I just ...
First and foremost, no I'm not asking please tell me how Google is built in two sentences. What I am asking is slightly different. I have a database filled with textual data that users input. We also give them the functionality to search for this data later. The problem is, we do a simple full text search now and return the results in an...
We want to use a ctxsys.context index type for full text search. But I was quite surprised, that an index of this type is not automatically updated. We have 3 million documents with about 10k updates/inserts/deletes per day.
What are your recommendations for syncing and optimizing an Oracle Text index?
...
I am using Lucene .NEt to do full-text searching. Till now I have been indexing PDF docs, but now I have a few webpages that I need to index. What's the best/easiest way to index HTML documents to add to my Lucene index? I am using .NET/C#
...
I am using SQL Server 2005 for full text searching. I did try the same create statement (with the same DB server collation //edit: Latin1_General_CI_AS) on SQL Server 2008 but it does not work anymore for umlauts:
create table "ArtistFullTextTest" (
"ID" int IDENTITY(1,1) not null CONSTRAINT ArtistFullTextTest_PK PRIMARY KEY,
"...
i got 2 tables:
threads: id, title
posts: id, thread_id, body
i want a document to contain the thread and all the posts that belong to it. why doesnt this work:
<document>
<entity name="threads"
query="select id, title from threads">
<field column="title" name="threads.title"/>
...
Ive got the following code.
$params = array('defType' => 'dismax', 'qf' => 'threads.title posts.body tags.name', 'hl' => 'true');
$results = $solr->search($query, $offset, $limit, $params);
So the keywords will be highlighted. What i dont know how to do is pulling the data out from $results. How do I get a documents field values and ...
i wonder how you get the search results that is highlighted like Google?
They search a text for the keyword you entered and then chop the text some nr of letters before and after the keyword and highlight it?
How do you accomplish that with PHP. What functions should you use to search the keyword and then return a specific length befor...
is it possible to get a regular expression that do:
find first occurence of some word in a string
return a substring of a nr of letters before and after the occurence
but if it encounters a . (dot) before the nr of letters before and after occurence, it will just return the sub string before/after the dot.
return whole words
example:...
I'm trying to make a detailed search engine for my web site.
The keywords are being searched in multiple fields and tables. For example, using keywords:
uludag
university
These keywords are being searched in the education, address, contactname, and contactsurname fields in my Members table.
I have to do it so because there must b...
i´ve got 3 query fields that i´ve set with qf.
but i want one of these fields to have at least one match of the query strings.
how could i do it in the settings without having to add + manually in the q parameter (cause the user will type the keywords and i want this to be default).
...
I am trying get acts_as_ferret working in my rails applications. I have installed the ferret gem. Installed the acts_as_ferret plugin.
This is what my model looks like now.
class User < ActiveRecord::Base
acts_as_ferret :fields => {
:first_name => {},
:last_name => {}
}
I have even tried
class User < ActiveRecord::Base
...