Displaying 20 results from an estimated 37 matches for "op_and".
2010 Jan 19
1
QueryParser: aliases and OP_AND
Hello,
I'm wondering about how the QueryParser parses a query containing an "alias" when the default operator is OP_AND
(by "alias", I mean a search field mapped to multiple term prefixes).
With the following php code :
<?php
$parser=new XapianQueryParser();
$parser->set_default_op(XapianQuery::OP_AND);
$parser->add_prefix('alias', 'AUT1:');
$parser->add_prefix('alias',...
2023 Mar 30
1
Having trouble with php8 bindings
...Thank you very much.
This then (because of course) led to some more things needing tidying
up and I've run into something I can't work out while trying to update
previously-worked-in-php7 code in the actual file I'm trying to update
$this->queryparser->set_default_op(Query_OP_AND);
...leads to "Undefined constant "App\Helpers\Query_OP_AND" because...
another namespace issue?
("OP_AND" and "XapianQueryParser::OP_AND" are also not accepted.)
jh
2011 Mar 23
1
how to change the default operator?
Hi all,
I'm sorry to bother you guys with such a rookie question. I tried to change the default boolean operator by editing the file queryparser.h like this:
void set_default_op(Query::op OP_AND);
However, after rebuilding I tested it with the query "grad school" and it still worked with the OP_OR as default, like this:
Parsed query is: Xapian::Query((Zgrad:(pos=1) OR Zschool:(pos=2)))
Could somebody give me any clue about this? Is there any other file in the queryparser direc...
2014 Oct 30
2
Does Xapian support retrieval optional?
Hi,
I've been using Xapian for a while. But there is a scene I don't know
whether supported already.
Suppose:
1. Raw query: how to make pizza
2. Parsed query: how AND to AND make AND pizza
3. Documents:
d1: how to make pizza at home
d2: 3 ways to make pizza
d3: make pizza in 4 easy steps
Question:
1. During searching process, how to retrieve d2, d3 (although they don't
2023 Mar 30
1
Having trouble with php8 bindings
...gt; This then (because of course) led to some more things needing tidying
> up and I've run into something I can't work out while trying to update
> previously-worked-in-php7 code in the actual file I'm trying to update
>
> $this->queryparser->set_default_op(Query_OP_AND);
>
> ...leads to "Undefined constant "App\Helpers\Query_OP_AND" because...
> another namespace issue?
>
> ("OP_AND" and "XapianQueryParser::OP_AND" are also not accepted.)
It's `XapianQuery::OP_AND`, which was also the correct name in the PH...
2019 Oct 14
1
[PATCH] gm107/ir: fix loading z offset for layered 3d image bindings
...);
void emitS2R();
void emitCS2R();
@@ -690,6 +692,31 @@ CodeEmitterGM107::emitRAM()
* predicate/cc
******************************************************************************/
+void
+CodeEmitterGM107::emitPSETP()
+{
+
+ emitInsn(0x50900000);
+
+ switch (insn->op) {
+ case OP_AND: emitField(0x18, 3, 0); break;
+ case OP_OR: emitField(0x18, 3, 1); break;
+ case OP_XOR: emitField(0x18, 3, 2); break;
+ default:
+ assert(!"unexpected operation");
+ break;
+ }
+
+ // emitINV (0x2a);
+ emitPRED(0x27); // TODO: support 3-arg
+ emitINV (0x20, insn...
2015 May 09
2
[PATCH 3/4] nvc0/ir: optimize set & 1.0 to produce boolean-float sets
...af19a 100644
> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
> @@ -973,6 +973,35 @@ ConstantFolding::opnd(Instruction *i, ImmediateValue &imm0, int s)
> }
> break;
>
> + case OP_AND:
> + {
> + CmpInstruction *cmp = i->getSrc(t)->getInsn()->asCmp();
> + if (!cmp || cmp->op == OP_SLCT)
how about if (cmp == NULL || ...) and kill the same condition later?
> + return;
> + if (!prog->getTarget()->isOpSupported(cmp->op, T...
2023 Mar 30
1
Having trouble with php8 bindings
On Thu, Mar 30, 2023 at 04:42:41AM +0100, John Handelaar wrote:
> It appears that I can't use anything in PHP8.2 if the PHP file from
> which I want to access xapian contains a namespace declaration,
> because the PHP functions themselves cannot be found.
You need to tell PHP to look in the root namespace, e.g.:
$test = new \XapianWritableDatabase('searchdb');
Another
2007 Dec 31
2
"and" without boolean operators
Salve,
Thank you very much for your kind answer. Spelling correction works very
well now. I have just one more question.
I am using Xapian::QueryParser() to create the Query. The flags are:
FLAG_PHRASE | FLAG_LOVEHATE | FLAG_WILDCARD
If I search, lets say for "king queen" (without quotes), I get all documents
with either "king" or "queen". Is there a chance to
2008 Dec 17
1
using ValueWeightPostingSource
...th an AND operator :
Xapian.Query queryText = parser.ParseQuery("test:" + textBox1.Text + "
DS:1 DS:2");
Xapian.Query postingQuery = new Xapian.Query(new
Xapian.ValueWeightPostingSource(database, (uint)ValueField.BestSell));
Xapian.Query query = new Xapian.Query(Xapian.Query.op.OP_AND,
queryText, postingQuery);
My first question is : Is this the right way to make the query ?
And my second :
My problem now is that it returns only document which has a "bestsell
value" set.
Do i have to change something in the ValueWeightPostingSource so it
will treat document without &...
2009 Jan 10
2
QueryParser::parse_query() uses OR by default? How to switch to AND?
I use the QueryParser::parse_query() method but I see it uses "OR" by default between words? Is
there a way to make it use "AND" instead?
I see there are flags I can pass to the parse_query() method but none seems to allow a switch from
OR to AND.
I would like to do that without having to write my own query parser. Everything else is fine with
the QueryParser parsing, for
2014 Sep 26
0
[PATCH] gm107/ir: take relative pfetch offset into account
...2..64989ac 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_gm107.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_gm107.cpp
@@ -159,7 +159,10 @@ GM107LoweringPass::handlePFETCH(Instruction *i)
bld.mkOp2(OP_SHR , TYPE_U32, tmp1, tmp0, bld.mkImm(16));
bld.mkOp2(OP_AND , TYPE_U32, tmp0, tmp0, bld.mkImm(0xff));
bld.mkOp2(OP_AND , TYPE_U32, tmp1, tmp1, bld.mkImm(0xff));
- bld.mkOp1(OP_MOV , TYPE_U32, tmp2, bld.mkImm(i->getSrc(0)->reg.data.u32));
+ if (i->getSrc(1))
+ bld.mkOp2(OP_ADD , TYPE_U32, tmp2, i->getSrc(0), i->getSrc(1));
+ els...
2015 Jan 05
0
[PATCH] nv50/ir: change the way float face is returned
...n/nv50_ir_lowering_nv50.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp
@@ -1094,8 +1094,9 @@ NV50LoweringPreSSA::handleRDSV(Instruction *i)
case SV_FACE:
bld.mkInterp(NV50_IR_INTERP_FLAT, def, addr, NULL);
if (i->dType == TYPE_F32) {
- bld.mkOp2(OP_AND, TYPE_U32, def, def, bld.mkImm(0x80000000));
- bld.mkOp2(OP_XOR, TYPE_U32, def, def, bld.mkImm(0xbf800000));
+ bld.mkOp2(OP_OR, TYPE_U32, def, def, bld.mkImm(0x00000001));
+ bld.mkOp1(OP_NEG, TYPE_S32, def, def);
+ bld.mkCvt(OP_CVT, TYPE_F32, def, TYPE_S32, def);...
2016 Mar 27
2
PHP5 - Query Parsing Bug
I'm replying to a very old thread (9 years ago) here
http://grokbase.com/t/xapian/xapian-discuss/072tprmr6h/php5-query-parsing-bug
So not sure if that's going to end up being more or less readable...
I have this error :
Fatal error: No matching function for overloaded 'new_Query' in
/usr/share/php/xapian.php on line 2607
Line 2607 (and surrounding) looks like this and are in
2006 Feb 07
1
Omega
Are there any options to forming queries with Omega? For instance can
you specify a proximity search like "file near 5 manager"? If so, where
might I find this documented? I don't see it in the docs directory.
Thanks
Jim.
2007 Oct 01
3
How to beat Google aka Xapian & Natural Language Processing.
...t
sentence. Natural Language Processing is not a new thing and there has
been lot of work done that yield inconsistent results.
What I am trying to point out is that we need start to think about
using natural language processing when placing infrastructure for
Xapian. So far we have the following OP_AND, OP_AND_MAYBE,
OP_AND_NOT, OP_ELITE_SET, OP_FILTER, OP_NEAR, OP_OR, OP_PHRASE,
OP_VALUE_RANGE, OP_XOR search operators and we could add one more
OP_NLP.
What we can do now is to implement OP_NLP to tagged nouns,
adjectives, adverbs, punctuations, foreign words etc. Calculate
relation between them...
2010 Sep 01
8
FIXMEs in Search::Xapian
Carrying on this conversation:
http://lists.tartarus.org/pipermail/xapian-discuss/2007-March/003513.html
void
TermGenerator::set_stopper(stopper)
Stopper * stopper
CODE:
// FIXME: no corresponding SvREFCNT_dec(), but a leak seems better
than
// a SEGV!
SvREFCNT_inc(ST(1));
THIS->set_stopper(stopper);
It would be good to fix these FIXMEs.
A class-level HASH could be
2005 Jun 09
1
Query parser and stemming of norwegian letters
...ollowing code:
....
pqp=new QueryParser();
Stem stem("norwegian");
cout << "DEBUG " << stem.stem_word(_sXapian)<< endl;
pqp->set_stemmer(stem);
pqp->set_database(*_pdatabase);
pqp->set_default_op(Query::OP_AND);
//Set the enquire
Query p=pqp->parse_query(_sXapian);
cout << " Query " << string(bufSL) << p.get_description() << endl;
---
gives the follwing output
DEBUG h?y
Query norwegianXapian::Query((ha:(pos=1) AND y:(pos=2)))
the ? is un...
2006 Jan 31
1
retrieving attributes of searchresults
...------------------------------
------------>8-------------------------------------------------------
## vital parts of search
################################
my @srch = qw/nachrichtenagentur bloomberg t?rkischen XAUTHORcp
XTITLEakquisition/;
my $q = Search::Xapian::Query->new(OP_AND,@srch);
my $enq = $db->enquire($q);
my $mset = $enq->get_mset(0,999);
my @matches;
tie(@matches, 'Search::Xapian::MSet::Tied', $mset);
foreach my $match (@matches) {
my $doc = $match->get_document();
printf "ID %d %d%% [ %s ]\n", $match->get_docid(),...
2007 Feb 02
1
Working demo of search engine using boolean query.
...', $secondary_terms;
#------------------------------------------------------------------------------#
my $query1 = Search::Xapian::Query->new( OP_OR, @primary_terms );
my $query2 = Search::Xapian::Query->new( OP_OR, @secondary_terms );
my $boolean_query = Search::Xapian::Query->new( OP_AND, $query1, $query2 );
$enq->set_query( $boolean_query );
#------------------------------------------------------------------------------#
printf "Parsing query '%s'\n", $enq->get_query()->get_description();
my $total = $enq->matches(1, 100000000);
print "Total:...