Skip to content

Commit

Permalink
substr -> any
Browse files Browse the repository at this point in the history
  • Loading branch information
leeoniya committed Sep 24, 2022
1 parent cccc469 commit 5259abd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,10 @@ Options with an **inter** prefix apply to allowances _in between_ search terms,
<td>Callback for excluding results based on term &amp; match</td>
<td><code>(term, match, index) => true</code></td>
<td>
Length difference threshold<br>
Levenshtein distance<br>
Term offset or content<br>
Do your own thing, maybe...
- Length diff threshold<br>
- Levenshtein distance<br>
- Term offset or content<br>
</td>
</tr>
<tr>
Expand All @@ -177,22 +178,22 @@ Options with an **inter** prefix apply to allowances _in between_ search terms,
</tr>
<tr>
<td><code>interLft</code></td>
<td>Determines allowable term start boundary</td>
<td>Determines allowable term left boundary</td>
<td><code>0</code></td>
<td>
Searching "mania"...<br>
<code>0</code> substr - anywhere: ro<b>mania</b>n<br>
<code>0</code> any - anywhere: ro<b>mania</b>n<br>
<code>1</code> loose - whitespace, punctuation, alpha-num, case-change transitions: Track<b>Mania</b>, <b>mania</b>c<br>
<code>2</code> strict - whitespace, punctuation: <b>mania</b>cally<br>
</td>
</tr>
<tr>
<td><code>interRgt</code></td>
<td>Determines allowable term end boundary</td>
<td>Determines allowable term right boundary</td>
<td><code>0</code></td>
<td>
Searching "mania"...<br>
<code>0</code> substr - anywhere: ro<b>mania</b>n<br>
<code>0</code> any - anywhere: ro<b>mania</b>n<br>
<code>1</code> loose - whitespace, punctuation, alpha-num, case-change transitions: <b>Mania</b>Star<br>
<code>2</code> strict - whitespace, punctuation: <b>mania</b>_foo<br>
</td>
Expand Down
8 changes: 4 additions & 4 deletions demos/compare.html
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
<label>
interLft
<select id="interLft">
<option value="0">substr</option>
<option value="0">any</option>
<option value="1">loose</option>
<option value="2">strict</option>
</select>
Expand All @@ -136,7 +136,7 @@
<label>
interRgt
<select id="interRgt">
<option value="0">substr</option>
<option value="0">any</option>
<option value="1">loose</option>
<option value="2">strict</option>
</select>
Expand Down Expand Up @@ -373,8 +373,8 @@
intraChars: (tmpVar = urlParams.get('intraChars')),
interChars: (tmpVar = urlParams.get('interChars')),

interLft: (tmpVar = urlParams.get('interLft')) != null ? +tmpVar : 0,
interRgt: (tmpVar = urlParams.get('interRgt')) != null ? +tmpVar : 0,
interLft: (tmpVar = urlParams.get('interLft')) != null ? +tmpVar : 0,
interRgt: (tmpVar = urlParams.get('interRgt')) != null ? +tmpVar : 0,

sort: urlParams.get('sortPreset') == 'typeahead' ? typeAheadSort : null,

Expand Down

0 comments on commit 5259abd

Please sign in to comment.