[sword-devel] lemma search (was sword-1.6.0RC1 available)
Troy A. Griffitts
scribe at crosswire.org
Sat Apr 25 21:52:03 MST 2009
Matthew,
I'm not sure you understand what you are asking. You need to understand
the syntax for attribute searching.
There is no such thing as specific code for 'paired lemma unindexed
searches'. This is a concept. It is something you can conceptually do
with entryAttribute searching. entryAttribute searching has no idea of
what each attribute is. It doesn't know about any specific attribute,
neither does it limit filters from adding any new attribute.
Attributes are 3 conceptually stored in 3 levels. lemma from words are
stored as such:
[Word][001][Lemma] = G1234
[Word][002][Lemma] = G5678
so entryAttribute search syntax works as such:
Word//Lemma/G1234/
This will return a hit from the previous set of data.
The design allows for flexible creation of many types of attributes for
an entry. We use them for things like headings, x-refs, KJVFrequencies
for lexicon entries. All kinds of things. And the search syntax allows
us flexibility to pull things out as we like.
KJV2003 introduced a new concept:
[Word][001][Lemma.1] = G1234
[Word][001][Lemma.2] = G5678
Notice that these are both on word 1.
Now we've introduced a new search syntax to handle this:
Word//Lemma./G1234/
This will do what you want.
The fact that you don't like to supply the '.', and haphazardly call the
design flawed because you have to supply such, doesn't make me very
sympathetic to your request. I already explained that the '.' syntax is
slower and there is currently only 1 type of entryAttribute which has
the concept of .1 .2 etc.
Other attributes may decide to suffix entries as well with things other
than .1 .2 .3 and there may be times they want or don't want to use the
new wildcard '.' search feature.
I'm sorry you don't like the default behavior, but you can accomplish
exactly what you want to accomplish by adding the '.' to your search
expression.
Hope this explains things better,
-Troy.
Matthew Talbert wrote:
>> Actually, no, I think the design is quite good and flexible for all the
>> various types of attributes we store. It could always have features added,
>> and I added this one in this release for you. I am sorry you don't like the
>> default.
>>
>> I actually said for _lemma searches_ I would always do it that way.
>>
>
> It isn't for me, as I don't use this feature. Users have reported
> inconsistencies in the search. I would be interested in knowing why
> paired lemma searches work correctly for indexed search, but we can't
> have that as the default for non-indexed search.
>
> Matthew
>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
More information about the sword-devel
mailing list