@@ -500,7 +500,7 @@ api.compactIri = ({
500
500
containers . push (
501
501
'@graph@id' , '@graph@id@set' ) ;
502
502
}
503
- containers . push ( '@graph' , '@graph@set' ) ;
503
+ containers . push ( '@graph' , '@graph@set' , '@set' ) ;
504
504
// allow indexmap if the graph is not indexed
505
505
if ( ! ( '@index' in value ) ) {
506
506
containers . push ( '@graph@index' , '@graph@index@set' , '@index' , '@index@set' ) ;
@@ -585,23 +585,29 @@ api.compactIri = ({
585
585
} else if ( '@type' in value ) {
586
586
typeOrLanguage = '@type' ;
587
587
typeOrLanguageValue = value [ '@type' ] ;
588
- } else if ( ! ( '@index' in value ) ) {
589
- // allw indexing by language even if no language present
590
- containers . push ( '@language' , '@language@set' ) ;
591
588
}
592
589
} else {
593
590
typeOrLanguage = '@type' ;
594
591
typeOrLanguageValue = '@id' ;
595
592
}
596
- if ( _isObject ( value ) && ! ( '@index' in value ) ) {
597
- // allow indexing even if no @index present
598
- containers . push ( '@index' , '@index@set' ) ;
599
- }
600
593
containers . push ( '@set' ) ;
601
594
}
602
595
603
596
// do term selection
604
597
containers . push ( '@none' ) ;
598
+
599
+ // an index map can be used to index values using @none , so add as a low priority
600
+ if ( _isObject ( value ) && ! ( '@index' in value ) ) {
601
+ // allow indexing even if no @index present
602
+ containers . push ( '@index' , '@index@set' ) ;
603
+ }
604
+
605
+ // values without type or language can use @language map
606
+ if ( _isValue ( value ) && Object . keys ( value ) . length === 1 ) {
607
+ // allow indexing even if no @index present
608
+ containers . push ( '@language' , '@language@set' ) ;
609
+ }
610
+
605
611
const term = _selectTerm (
606
612
activeCtx , iri , value , containers , typeOrLanguage , typeOrLanguageValue ) ;
607
613
if ( term !== null ) {
0 commit comments