feat: add support for @filterable tag

This commit is contained in:
Wieland Schöbl
2019-08-20 14:39:24 +02:00
parent 8bb09994de
commit 36bf17e323
3 changed files with 27 additions and 3 deletions

View File

@@ -12,7 +12,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {ElasticsearchFieldmap} from '../mapping-definitions';
import {ElasticsearchFieldmap, ElasticsearchFilterableMap} from '../mapping-definitions';
import {ElasticsearchDataType} from './typemap';
export enum analyzers {
@@ -48,3 +48,10 @@ export const fieldmap: ElasticsearchFieldmap = {
ignore: ['price'],
},
};
export const filterableTagName = 'filterable';
export const filterableMap: ElasticsearchFilterableMap = {
date: ElasticsearchDataType.keyword,
text: ElasticsearchDataType.keyword,
};